Christian Montoya wrote: >>>Considering conditional comments are not valid, >>> >>> >>Just a nitpick for the benefit of newbies... Conditional comments *are* >>valid. Every user agent other than IE recognizes them as regular valid >>HTML comments. This is why you can stick invalid stuff inside them and >>the validator doesn't complain -- it doesn't read the contents of these >>comments. >> >> > >Hm, that's sort of what I meant.. what I meant is they are not valid >HTML, but they do not turn up errors in the validator. >
No, they are valid HTML. That's why you don't get an error when you run a page with them through the validator. The validator and every other user agent, with the exception of IE, sees them as regular, valid comments. So, I could also write something like this: <!--[I love kittens]> yes I do <![end]--> And that's a valid form for an HTML comment to take. It's just nonsensical. Run it through the validator and see for yourself: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <!--[I love kittens]> yes I do <![end]--> </head> <body> </body> >Let me know if there is some reason why we should consider it "valid" >on IE's part to parse comments and display the contents. > > I'm not talking about whether it's "valid" for IE to parse these comments. That's a theoretical issue that is irrelevant, because IE's doing it whether it's "right" or not. I'm talking about whether they are valid HTML. They are. You can write comments that have bracketed text in them -- that's all conditional comments are. Zoe -- Zoe M. Gillenwater Design Services Manager UNC Highway Safety Research Center http://www.hsrc.unc.edu ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/