Versioned Script Language Attributes
browser wars 1996 partlyDeclaring which JavaScript you wrote, so older engines would skip the block.
In 2026: Modern browsers ignore the version and run every block, which is the opposite of what this was for. In 1996 Netscape 2 ran only the plain block, Netscape 3 ran up to 1.1 and so on, so people shipped the same function two or three times.
Where it came from: Netscape JavaScript Guide, 1996. The LANGUAGE attribute was deprecated in HTML 4.01 in favour of TYPE. MDN ↗
<script language="JavaScript">
// Everyone, including Netscape 2
var mode = "basic";
</script>
<script language="JavaScript1.1">
// Netscape 3 and up. Image preloading arrived here.
mode = "1.1: new Image() available";
</script>
<script language="JavaScript1.2">
// Netscape 4 and up. Layers and captureEvents arrived here.
mode = "1.2: layers available";
</script>
<script language="JavaScript">
document.write("Engine reported: " + mode);
document.write("<br>In 2026 every block above runs, so you get the last one.");
</script>