After updating an old webpage, I validated the HTML on the page with the W3C Markup Validation Service. One of the errors reported for the page was the following one:
Line 19, Column 30: required attribute "TYPE" not specified
<script language="JavaScript">
The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.
Typical values for type are type="text/css" for <style> and type= "text/javascript" for <script>.
In the head
section of the HTML code, I had the following line:
<script language="JavaScript">
I didn't realize that the language
attribute has been deprecated
in favor of the type
attribute. According to a posting I found
at HTML Script tag: type or language?
The language attribute has been deprecated. Both will work in pretty much all browsers, but the first better adheres to modern standards.
The javascript code on the page was working as expected when I viewed the page with a browser, but I changed the line to the one below:
<script type="text/javascript">