W3C home > Mailing lists > Public > www-html@w3.org > February 2002

Empty script tags cause trouble.

From: Edwin van Vliet <cheatah@50hertz.net>
Date: Sat, 16 Feb 2002 00:01:04 +0100
Message-ID: <001701c1b674$a5923a90$0ce0f0c3@savannah>
To: <www-html@w3.org>
If a shorthand empty script tag is included anywhere in the document, most
HTML editors get into trouble, especially the syntax highlighting is all
wrong. So the next sample doesn't work well:

<script type="text/javascript" src="somescript.js" />

While the normal method works as expected:

<script type="text/javascript" src="somescript.js"></script>

As worst of all: Internet Explorer fails on this piece of code as well, yet
Mozilla and Netscape act as I think they should. Therefore I would very much
like to know why this isn't handled properly. Is this not valid XHTML, or is
this a bug in the different types of software? The w3 validator does not
return any errors, so I can only think of 2 possible causes:

1: a bug in a lot of editors and even browsers
2: a bug in the w3 validator

Or might there be other things I didn't think of?
Received on Friday, 15 February 2002 18:01:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:50 GMT