<STYLE TYPE="..."> (HTML Tag Attribute)

The mime type for a block of JSSS style code.


JavaScript - 1.2
JScript - 3.0
Internet Explorer - 4.0
Netscape - 4.0
HTML syntax:<STYLE TYPE="..."> some JSSS Code </STYLE>
Argument list:...A MIME type that signifies JavaScript source text.
someCodeSome script based style text

The same MIME type values that apply to the <SCRIPT> tag are also used for the <STYLE> tag when this attribute is applied.

When this JavaScript style sheet is evaluated, the interpreter adds the document to the scope chain so that the tags, classes and ids properties of the document object can be accessed directly as if they were global values. This saves accessing them with the document object prefix. Thus:

document.tags becomes tags

document.classes becomes classes

document.ids becomes ids


See also:<META>, <SCRIPT TYPE="...">, <SCRIPT>, <STYLE>, Adding JavaScript to HTML, JavaScript Style Sheets, MIME types, SCRIPT.type, StyleSheet.type, text/JavaScript


Wrox Instant JavaScript - page 50