[whatwg] <p> elements containing other block-level elements
Matthew Thomas
mpt at myrealbox.com
Thu Apr 7 16:17:56 PDT 2005
Anne van Kesteren wrote:
>...
>> Lists should not be classified as block level or inline level
>> elements within the spec.
>
> I think they should. (Note that block and inline are different here from
> the definition CSS applies to them.) That way they get another content
> model that might be more suited for inline situations.
You mean perhaps a content model like this? <p>For this recipe you need
<ul><li>an egg</li>, <li>flour</li>, and <li>butter</li></ul>. Mix it
all together and so forth.</p>
I think such a content model would have exactly the same problem as
Ian's semantically inferior example (<ul><li>an egg,</li> <li>flour,
and</li> <li>butter.</li></ul>): no-one[1] would use it, because they
wouldn't get any benefit. Most authors use <ul> and <ol> only because
it's an easy way of achieving bulleted and numbered lists -- as shown by
their willingness to run to <div> (or worse, <br>) for any list that
they don't want bulleted.
<p>It makes sense to allow bulleted/numbered lists inside paragraphs,
for two reasons:<ul>
<li>such lists are already used in typography</li>
<li>they would have acceptable presentation in UAs that claim HTML4
support.</li>
</ul>But as for inline lists, I think creating markup for them would be
a waste of time.</p>
Agreed with the rest of what you said, though. 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.
[1] By which of course I mean "no-one except the sort of people who
write about markup in their Weblogs". :-)
--
Matthew Thomas
http://mpt.net.nz/
More information about the whatwg
mailing list