On 2 Sep, 17:57, "Doug Jolley" <[EMAIL PROTECTED]> wrote: > > <!-- --> is an html tag such as <p> > > I've often thought that it should be; but, I've never been able to > convince myself that it is. The reason is this: If an html comment > (e.g., <!-- Comment -->) is an empty ! element (and as such has only > one tag); then, why wouldn't we have to say, "<!-- Comment -- />?
You are right. '<!-- -->' is not an html element, it's an SGML markup, like '<!DOCTYPE ...>'. '<?' is start of an SGML prosess instruction, '<!' is start of an SGML declaration, and '<!--' is start of an SGML comment. Just '<' is start of a element. You can use SGML comments inside elements, but not inside tags. http://www.w3.org/TR/html4/struct/global.html#h-7.1 If you want to know more, I think you have to show some money :-(. http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=16387 If you don't want to pay, the nearest you get is: http://www.w3.org/TR/REC-xml/ BTW: Inside a tag, the parser don't recognize '<', but the first '>' is recognized as the end of that tag. That's why all browser is showing an extra '>' in your example. Silly things like '<!--' and '--' inside the tag is just ignored. --~--~---------~--~----~------------~-------~--~----~ -- You received this because you are subscribed to the "Design the Web with CSS" at Google groups. To post: [email protected] To unsubscribe: [EMAIL PROTECTED] -~----------~----~----~----~------~----~------~--~---
