HTML and CSS Reference
In-Depth Information
Defines an executable script within a docu-
Attributes charset , defer , language , src , type
End tag
</script> ; never omitted
Used in
head_content , body_content The language and type attributes
Use the language or type attribute in the <script> tag to declare the
scripting language that you used to compose the contents of the tag. The
HTML 4 and XHTML standards deprecate the language attribute in favor of
the type attribute. Regrettably, the value for each attribute is different.
If you are using JavaScriptby far the most common scripting language on
the Webuse language=JavaScript or type="text/javascript" . You may oc-
casionally see the language value VBScript ( text/vbscript for type ), indic-
ating that the enclosed code is written in Microsoft's Visual Basic script.
Search WWH ::

Custom Search