W3C home > Mailing lists > Public > public-html@w3.org > October 2008

<q> vs <p>

From: Jim Jewett <jimjjewett@gmail.com>
Date: Fri, 31 Oct 2008 00:19:37 -0400
Message-ID: <fb6fbf560810302119u3f4cd3dl1c831a8c4b1d7e6f@mail.gmail.com>
To: "HTML WG" <public-html@w3.org>
Cc: j_james@mindspring.com, "Robert J Burns" <rob@robburns.com>

Justin James and Robert Burns wrote:

> >  Again, if <q> adds punctuation, so should <p> and any other element
> > which represents grammar.

Which other elements would those be?  I  think it would be stretching things
to say that <section> affects grammar.  Are <p> and <q> the only ones?
Or are you counting <li> typically adding a marker/bullet?

> The p element DOES add punctuation in the same way that the
> q elements adds punctuation. The following HTML:

> <p>here is a paragraph.</p><p>And that paragraph is followed by
> another paragraph.</p>

> will be rendered

> here is a paragraph.

> And that paragraph is followed by another paragraph.

But note that what it adds is strictly whitespace.  The parser has always
been allowed to normalize whitespace (including line breaks and leading
tabs) to whatever it feels is appropriate.

Quotation marks are not whitespace, and adding or removing them is
something that the parser normally shouldn't do, any more than it
should add or remove vowels.

HTML5 may require such a rule in practice, but ... it would be a
special case.  Whether that special logic is justified, I'm not sure.

-jJ
Received on Friday, 31 October 2008 04:20:15 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:58 UTC