Re: Toward Closure on HTML

Dave Raggett (dsr@hplb.hpl.hp.com)
Thu, 7 Apr 94 9:08:22 BST


I would like to clear up a confusion that people seem to be
having on paragraphs in html+.

This is correct:

<p>this is a paragraph.</p>

But so is:

<p>this is a paragraph.
<p>and this is another one
<p>and so is this

SGML allows you to omit end tags when specified by the document type
definition, as parsers can easily infer the end of the element. In this
case the next <P> tag implies the end of the previous paragraph.

***** THERE IS NO NEED TO WRITE THE </P>

Browsers can go beyond the SGML standard and infer missing start tags
as well, so the following illegal piece of html+

<h1>A header</h1>
followed by a paragraph.

Gets interpreted by the browser as:

<h1>A header</h1>
<p>followed by a paragraph.

Use <BR> to insert blank lines when you don't want to terminate the paragraph.

-- Dave Raggett