Re: Comments in markup?

Murray Altheim (
Tue, 30 Jul 1996 11:16:58 -0500

Message-Id: <v02110109ae23dfd7cc39@[]>
Date: Tue, 30 Jul 1996 11:16:58 -0500
To: (Arnoud "Galactus" Engelfriet)
From: (Murray Altheim)
Subject: Re: Comments in markup?
Cc: Foteos Macrides <MACRIDES@SCI.WFBR.EDU>, (Arnoud "Galactus" Engelfriet) writes:
>In article <v02110108ae22e711597e@[]>,
> (Murray Altheim) wrote:
>> 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.
>Then why can I use comment declarations in an HTML document, but not
>other SGML declarations? I'm not asking if any browser gets this right,
>just why an SGML parser would barf at it.

The only declarations allowed in an HTML document instance are comment
declarations. All other declarations appear in the DTD or declaration
subset (which isn't formally "allowed" in HTML). Note that aside from
comment declarations, the purpose of "declarations" in general is to define
markup and state markup relationships. This isn't something that happens in
document content, where only markup occurs.

I've an online document about HTML comments at:

[Any comments about this document please send to me rather than waste
bandwidth here.]


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