W3C home > Mailing lists > Public > public-html-comments@w3.org > April 2011

Re: HTML5 P and UL

From: Jukka K. Korpela <jukka.k.korpela@kolumbus.fi>
Date: Mon, 25 Apr 2011 14:51:40 +0300
Message-ID: <3D1792B4A08B4B52B09EECA23F714FD2@JukanPC>
To: <public-html-comments@w3.org>
Pol Briand wrote:

> Semantically, paragraphs (P elements) may contain one or several LIST
> (UL or OL elements).

That's more about syntax than about semantics, and whether a paragraph may 
contain lists is debatable, at a general level of discussion as opposite to 
HTML specifically. In HTML, it has always been a rule that a <p> eleement 
may contain "text-level" or "inline" or "phrasing" content only - no <ul> or 
<ol> elements for example.

If you are suggesting that HTML should be modified to allow lists inside 
<p>, then I'm afraid the suggestion has no hope of being accepted. The main 
reason is that such a change would break existing pages.

In HTML as currently defined, if you have, say,

<p>foobar<ul>

then a browser is required to infer a missing </p> before the <ul> tag, i.e. 
an <ul> element implicitly closes an open <p> element. This is because <ul> 
is not allowed inside <p> and the <p> element is defined as having an 
optional closing. If <ul> were allowed inside <p>, then where would the <p> 
element end?

It would be a different thing to prose a "superparagraph" element that may 
contain lists and perhaps other block contents as well, such as a 
blockquote, a pre element, or a table. I don't think it would be very 
realistic either (there's hardly any practical necessity for such an 
element, and practical benefits are more or less debatable), but it would 
have better chances than an essential change to an existing element.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 
Received on Monday, 25 April 2011 11:52:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 June 2011 00:14:06 GMT