IE and the script tag

I found some XHTML code today that doesn't display anything in IE. Apparently Internet Explorer does not like the XHTML standard close tag like <script /> tag. In XHTML mode if you close the tag that way it doesn't display any content on the page at all. You have to close your script tags with an opening and closing tag otherwise IE freaks out. Funny thing is that the single tag version validates just fine in the W3C validator.

<script foo="bar"></script>

Example: hidden-in-ie.html

Leave A Reply
All content licensed under the Creative Commons License