[thelist] css - can you put comments in there?

Simon Coggins ppxsjc1 at unix.ccc.nottingham.ac.uk
Mon May 14 07:53:39 CDT 2001


> speaking of css comments, does anyone know if we should be commenting out
> embedded styles for browsers that don't do css?

Yes, you should. From the CSS1 spec:

Traditionally, UAs have silently ignored unknown tags. As a result, old
UAs will ignore the 'STYLE' element, but its content will be treated as
part of the document body, and rendered as such. During a transition
phase, 'STYLE' element content may be hidden using SGML comments: 

<STYLE TYPE="text/css"><!--
H1 { color: green }
--></STYLE>

http://www.w3c.org/TR/REC-CSS1#containment-in-html

Simon






More information about the thelist mailing list