According to the W3C validator, I am getting this error:
The
language
attribute on thescript
element is obsolete. You can safely omit it.…uage="JavaScript" src="js/gen_validatorv31.js" type="text/javascript"></script>
How do I fix this?
I checked through the script and it should not be an issue.
The language attribute in JavaScript is optional since the introduction of HTML5 brought some new improvements. JavaScript became the default language for HTML5 and modern browsers. Therefore, now adding javascript isn't required in <script> tag. This attribute specifies what scripting language you are using.
Attributes: Many attribute associated with script tag. async: It is used to specify the script is executed asynchronously. charset: It is used to specify the character encoding used in an external script file. defer: It is used to specify that the script is executed when the page has finished parsing.
The language attribute is used to mention the scripting language. Typically, its value will be javascript. Although recent versions of HTML (and XHTML, its successor) have phased out the use of this attribute.
Attributes of HTML script tag It is a boolean value which specifies that the script is executed asynchronously. HTML5. defer. It is a boolean value which is used to indicate that script is executed after document has been parsed. HTML 4.01, HTML5.
<script type="text/javascript" src="js/gen_validatorv31.js" language="JavaScript"></script>
You don't need to include redundant language="JavaScript"
. Specifying just the type
and src
is valid, language
is obsolete, remove it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With