RE: Ignoring empty paragraphs

I think we all agree that the spirit of the comment in HTML 4.0 was:
"Visual user agents shouldn't allow authors to use empty <p> elements
to make a vertical gap.  That's an abuse."

Taken that way, it can be seen as a requirement by HTML on the
rendering mechanism, i.e. a requirement on CSS itself.

My new stance is that such a statement has no place in a W3C spec.
I think the intent was to force people to clean up their code.  But
the use of <p> for spacing is the least of HTML's problems.  (Let's
talk about <ul> for indentation sometime.)

If semantic markup is a good thing, the way to advance it is to
make a strong argument in its favor - not make special exceptions
for the sole purpose of breaking Tag Soup.

Matthew Brealey wrote:
> Margins collapse vertically in CSS.

True.  More than one empty paragraph (if no one assigns borders or padding
on <p> elements) looks like one empty paragraph.  But one
empty paragraph still doesn't look like zero empty paragraphs.

<div>foo</div><p></p><div>bar</div>
The <p> is not "ignored" here; it introduces a gap of about 1em,
depending on your browser's setting for margins on <p>.


-- 
Jason Orendorff

Received on Monday, 10 April 2000 13:39:28 UTC