[thelist] XHTML comment tag

Ben Dyer ben_dyer at imaginuity.com
Wed Feb 5 10:32:01 CST 2003


At 10:21 AM 2/5/2003, you wrote:
>If I understood it well, the old fashioned <!-- Comment --> tag has been
>depreciated in the XHTML space.
>Now I am trying to validate a page that uses <![CDATA[Comment]]> or
><![CDATA[ Comment ]]>, but the W3C validator tells me that this syntax is
>not right (character data is not allowed here).
>Can somebody show me de right way to insert comments in XHTML?

The <!-- Comment --> isn't deprecated in XHTML.  It should work fine.

The <![CDATA[ ... ]]> is for hiding the contents of <script> or <style> tags.

--Ben




More information about the thelist mailing list