It's fine in all current browsers.
The only browser that got <script id>
wrong was Netscape 4, which we stopped caring about a long, long time ago.
That quirksmode page seems to be badly out of date, what with its use of language
attributes, script <!--
hiding, and application/x-javascript
. Its advice about avoiding <script>
in the <body>
(and putting it in <head>
instead) is at odds with today's encouraged practices.
If we're talking <script>
attribute compatibility problems: defer
doesn't work everywhere so don't rely on it; charset
doesn't work everywhere, and neither does the charset parameter on the served script's Content-Type, so your script charset had better match the page; type
should always be text/javascript
and not one of the non-working alternatives the pedants who wrote RFC 4329 would like you to use.