Nesting of HTML elements

Robert C Powell (bpowell@netcom.com)
Tue, 11 Oct 1994 02:38:04 -0700


Hello. Can anyone point me to a definitive answer as to whether
or not HTML tags - for headers and text elements - can be nested
and have the appearence be relatively consistent
(not completely dependant on the specific HTML parser used)
vs. non-nested tags.

In english, is browser performance well defined for cases like:

<BODY>
<H1> heading1 <P>
<H2> heading 2 <P>
<H3> heading 3 <P>
</H3>
</H2>
</H1>
</BODY>

vs. (will this appear the same as)

<BODY>
<H1> heading1 <P> </H1>
<H2> heading 2 <P> </H2>
<H3> heading 3 <P> </H3>
</BODY>

even in the same browser? (MacMosaic is yes, MacWeb is no).

The HTML DTD does mention

<!ENTITY % stext -- as htext but also nested structure --
"P | HR | %list | DL | ADDRESS
| PRE | BLOCKQUOTE
| %literal | %htext">

but I have to admit to ignorance in reading BNF grammer,
such as in the DTD, correctly.

Your experience and advice is greatly appreciated.

Sincerely,

Bob Powell