HTML and CSS Reference
document.write("Hello, world!<br />");
The <script> tag also has attributes to modify the behavior of the tag. The
You normally set the language attribute as follows:
According to the W3C recommendation, the value assigned to this attribute is an
identifier for the scripting language, but because these identifiers are not standard, this
attribute has been deprecated in favor of the type attribute.
The language attribute can be assigned a version number to specify what version of
the script will be totally ignored. You shouldn't have to worry about this if you are using
the latest version of a particular browser, but just in case, here's how you specify a ver-
The type attribute is used to specify both the scripting language and the Internet con-
2. Although common to most scripts, the language attribute has been deprecated as of HTML 4.0 in favor of
the type attribute.