An HTML 4.0 compliant Web browser that cannot render scripts must render contents of a
<noscript> element. Compliant Web browsers that can render scripts should render contents of a
<noscript> element when scripting is disabled.
The standard also says Web browsers should render
<noscript> after a script it could not render earlier in a document. This feature is of questionable desirability, and is rarely observed in practice.
text/ecmascript (marked obsolete). Examples in the HTML 4.0 specification incorrectly used then‐unregistered content type
text for code to be executed instead of text for humans to read was a mistake and can cause problems. Examples also incorrectly use
text/vbscript (instead of
text/tcl (instead of
type attribute replaces the ill‐defined
language attribute used by older browsers. HTML 4.0 simultaneously introduces
language for compatibility, and deprecates it in favor of
This Web browser executes scripts with these valid content types:
This Web browser executes scripts with these valid, obsolete content types:
This Web browser executes scripts with these unregistered content types:
Related Mozilla bug reports: text-ecmascript.
defer attribute marks scripts that may be executed after the rest of a page has finished rendering. It is used for scripts that do not generate document content (using methods like
document.writeln() functions in the scripts above).
document.writeln() functions until a page is fully loaded would cause generated content to be appended to the end of the page. However, one could defer a script that used DOM methods to insert content within a particular element in a document.
Related Mozilla bug reports: Defer.
Related Internet Explorer bug reports: Channel9 Wiki: Internet Explorer Standards Support.