- From: L. David Baron <dbaron@fas.harvard.edu>
- Date: Mon, 3 Apr 2000 19:53:18 -0400 (EDT)
- To: www-html@w3.org
- Cc: dbaron@fas.harvard.edu
Section 9.3.1 of the HTML spec [1] says "User agents should ignore
empty P elements." I am curious what the authors of this line intended
it to mean. I see two possible interpretations (although it is
possible to do something between the two, which I think is what Mozilla
currently does):
1) An empty P element should be ignored at the parsing stage, and
therefore should not appear in the DOM and should not be affected
by style sheets.
2) The default style sheet should make it impossible to see if an
unstyled empty paragraph is in the document. (This happens in
CSS if the P element has no padding or border, and the spacing
is created by margins.)
I prefer the latter approach because I think the former could be very
confusing to page authors trying to understand a user agent's
behavior. For example, in the first approach, many CSS properties
would have no effect (for example, 'clear', 'height', or 'border').
The first approach could also cause seemingly different behavior for
content created dynamically through the DOM than for content parsed
from markup. It could also cause problems with paragraphs intended for
manipulation through the DOM.
However, I'd be interested to hear the opinions of others on this
matter.
-David
[1] http://www.w3.org/TR/REC-html40/struct/text.html#h-9.3.1
L. David Baron Sophomore, Harvard (Physics) dbaron@fas.harvard.edu
Links, SatPix, CSS, etc. <URL: http://www.fas.harvard.edu/~dbaron/ >
WSP CSS AC <URL: http://www.webstandards.org/css/ >
Received on Monday, 3 April 2000 20:32:50 UTC