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

Matthew Thomas mpt at myrealbox.com
Fri Apr 8 05:28:52 PDT 2005


Ian Hickson wrote:
>...
> > <li>they would have acceptable presentation in UAs that claim HTML4
> >     support.</li>
> 
> Even in HTML5 UAs, in the HTML parser this:
> 
>    <p><ul><li></li></ul></p>
> 
> ....will become this:
> 
>    <p></p><ul><li></li></ul>

That's why I said "acceptable", rather than "perfect". (Others 
misunderstood what I meant too, so I should have used "readable". Access 
via the DOM is something I personally care less about.)

>...
> Of b and d I prefer b. That, along with embedding MathML and other XML 
> vocabularies, would be a reason to migrate to XML, if we consider that a 
> good thing.

It will perhaps be a good thing once a future version of XML gives 
authors the option of more graceful error-handling.

>...
> > The content model for any block element allowed inside paragraphs should 
> > be tweaked to not allow paragraphs when it's inside a paragraph, because 
> > nested paragraphs don't make sense.
> 
> Agreed. (Including inside nested <tables> and <li>s, I assume?

Yes. (<li>s were the main element I was thinking of. There are lists 
where each item is one or more paragraphs, lists that are completely 
inside paragraphs, and lists that have nothing to do with paragraphs. 
Those sets don't intersect.)

> But obviously excluding inside nested <blockquote>s.)

What? I can't think of any legitimate use case for that exception.

-- 
Matthew Thomas
http://mpt.net.nz/



More information about the whatwg mailing list