Does HTML5 require clients to support JavaScript?

后端 未结 3 1072
故里飘歌
故里飘歌 2021-01-20 17:09

Does HTML 5 need JavaScript?

Or it is an option and I can use HTML5, CSS3 and GWT instead of JavaScript?

Thanks

相关标签:
3条回答
  • 2021-01-20 17:20

    GWT is a toolkit that allows you to write your code in Java and then debug. When it deploys it translates to JavaScript. So even though you really do not know you are writing Javascript the tool is generating it for you. GWT generated code runs on the browser.

    HTML5 and CSS3 are tools for static web sites. If you add Javascript or GWT (Which is Javascript) then you can do more.

    0 讨论(0)
  • 2021-01-20 17:22

    No, HTML5 does not require JavaScript, although it does define a <script> element and it does define the javascript: protocol (an HTML5 UA should understand these, at least enough to ignore them). Imagine the case where a client browser simply 'disables all JavaScript, ever' (either by user-choice or because it does not support JavaScript).

    This is backed by #4 in the HTML 5 Draft under "Running a script"

    If scripting is disabled for the script element, or if the user agent does not support the scripting language given by the script block's type for this script element, then the user agent must abort these steps at this point. The script is not executed

    JavaScript is, however, the only scripting language endorsed by the draft, assumes the role of the default language, and is listed as a 'dependency'.

    0 讨论(0)
  • 2021-01-20 17:32

    You can read this to get idea of HTML 5.

    0 讨论(0)
提交回复
热议问题