About This HTML Issue
The language attribute on the <script> element has been obsolete since HTML4 and should be removed.
Early versions of HTML used language="JavaScript" to specify the scripting language. Modern HTML defaults to JavaScript, so neither language nor type is required in most cases. The type attribute replaced language long ago, but even type="text/javascript" is unnecessary now because all browsers treat scripts as JavaScript by default.
If you do need to specify a non-JavaScript type (such as type="module" or type="application/json"), use the type attribute. Otherwise, omit both attributes entirely.
Examples
Invalid: using the obsolete language attribute
<script language="JavaScript">
console.log("Hello");
</script>
Valid: no attribute needed for plain JavaScript
<script>
console.log("Hello");
</script>
Valid: using type when a specific type is needed
<script type="module">
import { greet } from "./greet.js";
greet();
</script>
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.