Re: Ignoring empty paragraphs

Matthew Brealey wrote:

> All this assumes that what HTML says is correct, and that is a very big
> assumption. I don't think empty P elements should be ignored at all, and
> saying that they should was just an undesirable kludge (ignoring things
> is never cool), and one that is not needed with proper CSS margin rules.

I agree that it's phrased poorly.


> I think all that HTML should say is:
> 'User agents should, by default at least (i.e., it is possible to
> override this behaviour using a style language such as CSS), collapse
> the margins between empty elements such as P or ADDRESS.'
> It just doesn't make any sense to ignore an element simply because it is
> called 'P'; furthermore, I don't think that it was intended to ignore an
> element on these grounds.

If I were writing the spec today, I'd say:

	The P element represents a paragraph [cite strunk & white or
	some such as an informative reference regarding the meaning
	of the term 'paragraph']. As paragraphs in
	conventional usage are not empty, this specification assigns
	no meaning to an empty paragraph. Authors should include
	at least one character, word, image, or form control
	in each paragraph.

		NOTE: historically, user agents have rendered
		empty paragraph elements as vertical whitespace,
		and authors have exploited this behaviour by
		using empty P elements to control the layout
		of their documents on those user agents.

		For reliable whitespace control, authors should
		use stylesheets. For example, see section XYZ
		of the CSS spec.

Dan Connolly, W3C

Received on Thursday, 13 April 2000 13:35:57 UTC