W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > July to September 2004

Re: Weather Report: Request for Appraisal

From: David Woolley <david@djwhome.demon.co.uk>
Date: Wed, 15 Sep 2004 07:33:24 +0100 (BST)
Message-Id: <200409150633.i8F6XO901717@djwhome.demon.co.uk>
To: w3c-wai-ig@w3.org

> 2. In XHTML documents, style and script content should not be in a comment
> because it technically means that the browser will see it as a comment and

Must not, not should not.

> not as actual style or script content (though browsers are currently
> forgiving about this). However, not using comments makes your document less

If the document is served as XHTML, rather than broken HTML (i.e. has
an HTTP header indicating that it is XHTML), the browser must honour
the comments and ignore the contents.  Almost certainly the reason that
the invalid XHTML is working is that it is being sent as HTML and
is therefore being processed under HTML error recovery rules, not as

Note that IE does not support XHTML, so one really should not
use XHTML on web sites for the general public.  You can, of course,
include all the optional opening and closing tags in HTML documents, so
that aspect of XHTML isn't a justification for sending it for general
consumption.  If necessary, you can use an XHTML master, and transform
before sending to legacy browsers.

Incdentally, DTD based validators will not fault XHTML with commented
out style and script elements.
Received on Wednesday, 15 September 2004 06:49:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:29 UTC