W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2005

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

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 14 Jul 2005 20:57:20 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0507142047020.7450@dhalsim.dreamhost.com>
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.)


> 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.


> >   * <menu>
> >   * <table>
> >   * <pre> 
> 
> These I also disagree with, for a different reason having to do with the
> semantics of the <p> element.
> 
> 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.


> 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.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 14 July 2005 13:57:20 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:41 UTC