[whatwg] <p> elements containing other block-level elements

dolphinling dolphinling at myrealbox.com
Thu Jul 14 17:38:01 PDT 2005

Ian Hickson wrote:
> On Thu, 14 Jul 2005, dolphinling wrote:
>>>Other elements that I could see being nested inside a paragraph are:
>>>  * <ol>
>>>  * <ul>
>>>  * <dl>
>>It's been said that no one will use these except people who write about 
>>this kind of thing on their weblogs.
> Note that people who write weblogs are an important part of our target 
> market, by the way. A minority in the real world but still an important 
> one, because they are often at the cutting edge. If bloggers use a 
> technology a lot, then it is quite likely that it will cause others to use 
> it as well. (RSS is an example of this.)

(Minor point here: they'll pick up a new technology, but they'll still 
be lazy in using it)

>>I think this is for a very important reason: people are lazy, and they 
>>don't want to do any more than they have to to get the job done. In the 
>>case of a paragraph with a list inside of it, *the semantics are 
>>imparted by the natural language of the document*. If I write "...an 
>>egg, flour, and butter...", I don't need to write <ul>, because it's 
>>already a list. And since I don't need to, I won't.
> Absolutely. I totally agree. The main use case is for marking up cases 
> where one would have written:
>    <p>Bla bla bla:</p>
>    <ul>
>     <li>Bla,</li>
>     <li>Bla, and</li>
>     <li>Bla</li>
>    </ul>
>    <p>...bla bla bla.</p>
> This is a structure I use a lot in e-mails, for instance. In this case, it 
> is clear that the sentence spans more than one <p>, but the sentence is 
> still just one semantic paragraph. Hence the list is in the paragraph, and 
> thus the <ul> should be too.

Then what I said later applies: <p> isn't for marking up paragraphs. The 
natural language tells the reader that it's a paragraph, so the markup 
doesn't need to. The markup is for separating one block of text from the 

>>As much as we tell people that "<p> doesn't mean 'line break', it means 
>>'paragraph'!", that's not true. <p> doesn't mean "paragraph", it means 
>>"a standalone block of text". This is true everywhere on the internet: 
>>the w3c specs, the current work of the whatwg specs, my webpages, and 
>>I'm sure the webpages of everyone else here.
> The current work of the WHATWG specs says:
>    A paragraph is typically a block of text with one or more sentences 
>    that discuss a particular topic, as in typography, but can also be used 
>    for more general thematic grouping. For instance, an address is also a 
>    paragraph, as is a part of a form, a byline, or a stanza in a poem.
> ...which seems clear enough to me. Incidentally, this is an example of one 
> paragraph, starting at "The current work" and ending at "in the middle", 
> including the blockquote in the middle.

Without the content model change, that quote is good[1]. If the content 
model is changed, though, it would seem to give <p> two meanings: a 
standalone piece of text, and a grammatical paragraph. Only the first is 
what it should be; the latter is unnecessary.

>>P.S.: Sorry for being 3 months late to the discussion. I'm 600 mails 
>>behind now, trying to catch up. Also sorry if this thread has come up 
>>elsewhere, I didn't see it in the subjects.
> Don't worry. I will be returning to many of these topics once the WA1 spec 
> is in more solid shape. At the moment I am attempting to flesh out first 
> drafts for all the new features, so that I can get implementation feedback 
> on those bits. As was requested by members of the list, I will only be 
> returning to the more semantic sides of the discussion after the newer 
> "applicationy" bits are written.

That's fine, take as long as you need (I certainly did). :-)

[1] I would prefer:

A paragraph is typically a block of text with one or more sentences, as 
in grammar, but can also be any other self-contained block of text, such 
as a sentence fragment, byline, or address.

...or something else including the lines "self-contained block of text" 
or an equivelant.


More information about the whatwg mailing list