Re: assorted HTML and SGML questions

Daniel W. Connolly (
Sun, 19 Nov 1995 01:41:34 -0500

In message <>, Joe Wells writes:
>>>>>> "lee" == <>
>>>>>> "Dan" == Daniel W Connolly <>
> Joe> Q: (("text/html" Internet Media Type)) Does text/html forbid
> Joe> including the SGML declaration (<!SGML ...>)? I know it forbids
> Joe> including a document type declaration subset, but the standard is
> Joe> unclear on whether the SGML declaration is allowed.
> Dan> To identify information as an HTML document conforming to this
> Dan> specification, each document must start with one of the following
> Dan> document type declarations.
> Dan> ...
>I must be stupid, but I don't see the information in there.

Nope, I'm the stupid one. I thought you were asking about doctype
declarations, but you were plainly asking about <!SGML ...>

The HTML standard says that a user agent _should_ use the supplied
SGML declaration. This is so that user agents that support _more_
than that (e.g. Unicode) are still conforming.

> Perhaps you
>mean that "must start with ..." implies that there can be nothing before
>the document type declaration.

Well... yes.

> Does that mean that the following is
>illegal because the first thing is not a document type declaration?
> <!-- document type declaration on next line -- >
> <!doctype html public "-//IETF//DTD HTML 2.0//EN">

Hmmm... yes, it does. Seems a little over-specified, but there
you have it.