W3C home > Mailing lists > Public > www-html@w3.org > May 2007

Re: Cleaning House

From: David Woolley <forums@david-woolley.me.uk>
Date: Wed, 02 May 2007 22:46:00 +0100
Message-ID: <46390698.7030804@david-woolley.me.uk>
To: www-html@w3.org

Lee Roberts wrote:
> <title>Some Title</title>
> <p>Some text.</p>

To be valid it needs a doctype declaration, but other than that it
is valid and well formed HTML 4.01 Strict, although not minimal, as
the </p> tag is not needed.

HTML 4.01 Transitional doesn't require the opening <p>, either.

Again adding doctype, the first example has exactly the same
DOM tree as

<html><head>
<title>Some Title</title>
</head><body>
<p>Some text.</p>
</body></html>

SGML was designed to help make documents directly human readable.

With the exception that the </p> would have been illegal in very early 
HTML, because <p> started life as a separator, the short form has always 
  been legal according to the formal grammar.

The sort of thing that causes problems in real world HTML are:

<b>xxxx<i>yyyy</b>zzzz</i>

<b><p>pseudo heading</p></b>

<table>
<img.....>
<tr>......

etc.
Received on Wednesday, 2 May 2007 21:46:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:10 GMT