22

According to the W3C validator, I am getting this error:

The language attribute on the script 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.

unor
  • 92,415
  • 26
  • 211
  • 360
Henrik Petterson
  • 6,862
  • 20
  • 71
  • 155

1 Answers1

43
<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.

sharptooth
  • 167,383
  • 100
  • 513
  • 979
Brandon
  • 68,708
  • 30
  • 194
  • 223
  • 2
    If you are using HTML5 `type="text/javascript"` is the default so you could leave that out too if you wanted. See http://www.w3.org/html/wg/drafts/html/CR/scripting-1.html#attr-script-type – Caltor Feb 19 '14 at 10:42