Re: Ignoring empty paragraphs

On Tue, 4 Apr 2000, Jan Roland Eriksson wrote:

> On Mon, 3 Apr 2000 19:53:18 -0400 (EDT), "L. David Baron"
> <dbaron@fas.harvard.edu> wrote:
> 
> >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...
> 
> > 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.
> 
> This is the correct interpretation.
> 
> The purpose of markup is to provide structure to content, i.e. a final
> marked up document shall appear as a serialized representation of a
> structure where we have "content embedded in markup". (nota bene, not
> the other way around, because that would be "tag soup" :)
> 
> If there's nothing to mark-up, there's no motivation for markup either.
> 
I'm afraid my recollection is quite the opposite -- that the intention of
this recommendation was to break the (still) common habit of using <p> <p>
... to add vertical spacing in a page, rather than prescribe parser
handline rules.

I would actually be really annoyed if a parser decided to discard valid
markup I mean, at least if it's still there (with no vertical size) I can
fiddle with it (edit the text, modify formatting, look at attributes.
etc.) but if you've actually discarded it from the parse tree, then it's
gone forever.....

Moreover, doing so would be impossible for XHTML handled by an XML parser,
which simply cannot discard elements on a whim.

Ian
--
Ian Graham ......................... Centre for Academic Technology
i a n   d o t   g r a h a m    a t    u t o r o n t o   d o t   c a
Information Commons                               Tel: 416-978-4548
University of Toronto                             Fax: 416-978-7705
..................... http://www.utoronto.ca/ian/ .................

Received on Monday, 3 April 2000 22:56:45 UTC