W3C home > Mailing lists > Public > www-validator@w3.org > September 2005

Re: possible error in validator

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Mon, 12 Sep 2005 11:43:48 +1000
Message-ID: <4324DD54.1000102@lachy.id.au>
To: "jesse@lostseed.com" <jesse@lostseed.com>
CC: www-validator@w3.org

jesse@lostseed.com wrote:
> When you have an xhtml 1.0 strict dtd document, and you
> self-close a script tag. ie: <script /> it will work in FF, but
> it will not render in the site in IE. This syntax is INCORRECT
> obviosuly but the validator does not say there is an error.

No, the syntax is correct.  It is a problem with the fact that your 
serving XHTML with the wrong MIME type.  When you serve as XHTML 
document as text/html, all browsers treat it as tag soup and parse it 
like erroneous HTML 4.  Thus, <script /> is not treated the same as 
<script></script> when served as HTML, though it will be when served as XML.

You need to serve XHTML documents as XML (using application/xhtml+xml or 
application/xml).  However, doing so will prevent IE users from 
accessing the site, since it does not support XHTML at all.  Basically, 
stick with HTML4 for now, don't use XML syntax and it will work for all 

Lachlan Hunt
Received on Monday, 12 September 2005 01:44:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:58:53 UTC