Re: HTML question

Arnoud (galactus@htmlhelp.com)
Fri, 09 May 1997 12:56:28 +0200


From: galactus@htmlhelp.com (Arnoud "Galactus" Engelfriet)
To: www-html@w3.org
Subject: Re: HTML question
Date: Fri, 09 May 1997 12:56:28 +0200
Message-ID: <cLwcz4uYO5nK089yn@htmlhelp.com>

In article <9259041608051997/A51001/RIT1/11B544041700*@MHS>,
"SINGH SATWINDER (516) 434-6274" <satwinder.singh@reuters.com> wrote:
> <DL>
> This is test1

This is invalid syntax; text is not permitted directly inside <DL>.
The HTML standard does not say anything about how to handle invalid
syntax of this type, there is only a recommendation on how to handle
unknown elements and attributes.

> Well now the question is, Is HTML grammer rigid or all these browsers
> are using the undocummented grammer. 

Browsers (and indeed any parsers) are free to handle invalid syntax
as they see fit. The most conservative approach is probably to
assume that the "expected" element was forgotten, so your example would
become
<DL>
<DT>This is test 1
</DL>
although this does not work in all cases (eg, with the nested <DL>,
which may not occur in <DT>, so you would also have to assume a <DD>).
An alternative would be to assume that <P> was meant, or to ignore
the <DL> altogether.

-- 
E-mail: galactus@htmlhelp.com .................... PGP Key: 512/63B0E665
Maintainer of WDG's HTML reference: <http://www.htmlhelp.com/reference/>