HTML and CSS Reference
Next, note the attribute in the <script> tag:
need to identify which language is to be executed through the type attribute.
attribute, like this:
However, unless your code calls for functionality specific to a certain version,
you can omit the language attribute.
Immediately following the opening <script> tag and right before its closing mate, you'll find the
code for creating an HTML comment. This practice stems from the earlier days of the Web where
essentially jump over the scripting language code because of the HTML comment placement. Many
web designers leave off the comment code, but others feel it is a good way to future-proof your
ond nature and I always include them.
This code uses a frequently applied function, document.write() that inserts a text string into the
thereof. In the example, the text returned from invoking the Date() object is written to the page.