Re: Comments in markup?

Murray Altheim (
Mon, 29 Jul 1996 17:15:49 -0500

Message-Id: <v02110108ae22e711597e@[]>
Date: Mon, 29 Jul 1996 17:15:49 -0500
To: (Arnoud "Galactus" Engelfriet)
From: (Murray Altheim)
Subject: Re: Comments in markup?
Cc: (Arnoud "Galactus" Engelfriet) writes:
>Yesterday I received an e-mail from someone who wanted to know more
>about HTML comments. I explained how they worked, and she then came
>up with the idea that you could embed comments in HTML tags then:
><A HREF="foo" -- A link to foo -->click here</A> would, according to
>her, be technically legal. Webtechs[0] didn't agree.
>When I tested this myself, I found out I couldn't use any SGML constructs
>other than DOCTYPES or comment elements in an HTML document when feeding
>it to the Webtechs validator. Is there a reason for this? Why would an
>SGML parser allow <!-- foobar --> but not <!ENTITY foobar ...>, both of
>which are valid SGML constructs?

Comments are only allowed in declarations. And the only declarations within
HTML document instances you'll find are comment declarations -- all the
rest is considered markup. You'll note that you can't put <!ENTITY ..>
declarations within the document instance either.


     Murray Altheim, Program Manager
     Spyglass, Inc., Cambridge, Massachusetts
     email: <>
     http:  <>
            "Give a monkey the tools and he'll eventually build a typewriter."