|
Posted by Alan J. Flavell on 06/22/06 13:12
On Thu, 22 Jun 2006, Harlan Messinger wrote:
> David Dorward wrote: [in reference to XHTML]
> > > <style type="text/css">
> > > <!--
> >
> > Two reasons, first - you commented out your stylesheet. So it will be
> > ignored
>
> It won't.
You evidently don't understand XHTML.
> <!-- and --> are permitted to appear in CSS
XHTML doesn't care in the least what the rules of CSS say. It has to
parse the document according to the rules of XHTML /before/ taking its
decision on what to do with the content - in this case, to pass the
content to CSS - but, by the time it gets that far, there *is* no
content left to be passed on, since it was all commented-out.
> but aren't treated as comment delimiters.
HTML has declared the content of the style and script elements as
CDATA, so that's correct for HTML. But D.D was not talking about
HTML.
If you write XHTML, the rules of HTML are only of indirect interest.
> This allows the CSS code to be hidden from agents that don't know
> what <STYLE> tags are so that they don't treat it as (bad) HTML.
This is pretty much cargo-cult, you know. Pre-HTML/3.2 browsers would
be of little use nowadays anyway (for example, browsers from that era
typically did not support name-based virtual hosts, which makes them
of very limited practical use in today's web situation).
> > (unless you're serving your XHTML as text/html, in which case -
> > what's the point?).
You don't seem to have perceived the significance of what you so
helpfully quoted!
Navigation:
[Reply to this message]
|