[whatwg] Re: OT: (X)HTML and design of site

Malcolm Rowe malcolm-what at farside.org.uk
Tue Jul 20 05:15:10 PDT 2004


Pete Harlow writes:
> I wrote www.catnip.co.uk in validated XHTML 1.0 served text/html, and as 
> far as I know it renders OK in most browsers.

If nothing else, if you decide to serve that as application/xhtml+xml, 
you'll discover that the <script> doesn't function any more, because you've 
commented it out. 

If you want it to work as both text/html and application/xhtml+xml, you need 
to use: 

<script type="text/javascript">
<!--//--><![CDATA[//><!--
       ...
//--><!]]></script> 

(see http://hixie.ch/advocacy/xhtml for more detail) 

Alternatively, if you don't care about ever sending it using the right MIME 
type, why bother writing it as XHTML? 

Regards,
Malcolm



More information about the whatwg mailing list