- From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
- Date: Mon, 12 Sep 2005 11:43:48 +1000
- 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 browsers. -- Lachlan Hunt http://lachy.id.au/
Received on Monday, 12 September 2005 01:44:17 UTC