W3C home > Mailing lists > Public > www-html@w3.org > June 1998

Re: Comments in HTML

From: Peter Flynn <pflynn@imbolc.ucc.ie>
Date: 18 Jun 1998 16:37:51 +0100
To: roconnor@uwaterloo.ca
Cc: www-html@w3.org
Message-id: <199806181537.QAA18912@imbolc.ucc.ie>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:37 GMT