W3C home > Mailing lists > Public > www-validator-css@w3.org > March 2009

Re: About empty <p> element(Re: Re: To fix syntax errors of HTML files

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Wed, 4 Mar 2009 23:26:38 +0200
Message-ID: <7156282180E648B2B5D8C18918594B3B@JukanPC>
To: "css-validator" <www-validator-css@w3.org>
olivier Thereaux wrote:

>> http://www.w3.org/TR/1999/REC-html401-19991224/struct/
>> text.html#h-9.3.1
>> Is this not enough?
>
> Right, empty paragraphs are not a good idea, which is basically what
> the specification says. Note that the prose stays away from applying
> any form of normative stress, no MUST, no SHOULD.

If the statement "We discourage authors from using empty P elements", made 
in a W3C recommendation, does not have any form of normative stress, I 
wonder what has.

And actually, it additionally says:
"User agents should ignore empty P elements."

The word "should" is not in uppercase, but according to clause 4, this is 
not significant:
"The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 
document are to be interpreted as described in [RFC2119]. However, for 
readability, these words do not appear in all uppercase letters in this 
specification."

Surely if the specification says that empty paragraphs should be ignored, it 
would be manifestly, grossly, extraordinarily stupid idea to use them in the 
hope of creating empty space with them (which is why they are used, apart 
from mere mistakes and slips).

Now, getting back to reality, we know that browsers do not ignore empty 
paragraphs, and I don't expect they ever will. But technically, the HTML 
4.01 specifications say they should, and there is no reference to styling 
here - so styled or unstyled, <p></p> should be ignored.  This of course 
also applies to implicitly closed empty paragraphs, as in

<p><table ...

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 
Received on Wednesday, 4 March 2009 21:27:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:22 GMT