Re: Comments in HTML

Russell asks:
   Why do the specs say that leading spaces in a comment block are illegal?

   <! -- Why is this comment illegal? -- >

Because SGML defines them that way. <! opens a markup declaration: if
it's a comment declaration, then the comment sequence -- must follow
immediately. 

Don't think of -- as being the comment delimiter: that is only true
inside DTDs, and even then only inside declarations in certain
circumstances. 

In regular HTML files, <!-- starts a comment and --> ends it. Period.

///Peter

Received on Thursday, 18 June 1998 11:36:32 UTC