If it works in IE, you're serving it as text/html. <script /> is NOT a closed tag in text/html content. And looks like IE6 in fact _fixed_ a bug.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → INVALID
Thanks. Does the same apply to the css tag or only the script tag? Are there any other cases that are like the script tag? Where can I find a reference that shows that the script tag can't be self closing?
Marking Verified. I don't know the answer to the questions above, but a good place to try is the Mozilla DOM newsgroup or similar: news://news.mozilla.org/netscape.public.mozilla.dom It's not JS Engine, since the engine has no concept of HTML tags.
Status: RESOLVED → VERIFIED
See appendix C of the XHTML specification. It describes the rules an XHTML file must follow to work as text/html. One of them is that nonempty tags need an explicit end tag. This would include <script>, <style>, etc.
Not if you expect it to work with any current browser.
You need to log in before you can comment on or make changes to this bug.