[whatwg] Interpretation issue: can <section> be used for "extended paragraphs"?
Markus Ernst
derernst at gmx.ch
Wed Jun 15 01:42:06 PDT 2011
Am 14.06.2011 18:06 schrieb Tab Atkins Jr.:
> On Tue, Jun 14, 2011 at 2:04 AM, Markus Ernst<derernst at gmx.ch> wrote:
>> Am 14.06.2011 09:32 schrieb Ian Hickson:
>>> On Fri, 11 Mar 2011, Markus Ernst wrote:
>>>> Consider this markup of Andy's use case:
>>>>
>>>> <p>I always like to eat these cheeses:
>>>> <il>
>>>> <ili>Cheddar</ili>,
>>>> <ili>Stilton</ili>, and
>>>> <ili>Red Lester</ili>,
>>>> </il>
>>>> but I enjoy them most with one of these biscuits:
>>>> <il>
>>>> <ili>wheat crackers</ili>,
>>>> <ili>rye crackers</ili>,
>>>> <ili>digestives</ili>,
>>>> </il>
>>>> and some chutney.</p>
>>>>
>>>> <il> stands for "inline list",<ili> for "inline list item" (it's a pity
>>>> we can't reuse<li> for BC reasons). Conforming UAs would be required to
>>>> ignore any content in an<il> element, except it is in an<ili> element.
>>>> Like that, the above example would be perfectly readable in legacy UAs,
>>>> but make sense in HTML5-capable UAs.
>>>>
>>>> It would even be easy to stlye the output for legacy UAs supporting
>>>> display:list-item, as this example illustrates:
>>>> http://www.markusernst.ch/stuff_for_the_world/list-test.html
>>>
>>> What problem does this solve?
>>
>> It solves the first use case Jukka mentioned in his original post:
>>
>> Am 10.03.2011 09:20 schrieb Jukka K. Korpela:
>>> The<p> element (ever since it became an element) has always allowed
>>> inline (text-level) content only, and no change is planned to this in
>>> HTML5. Under these circumstances, what should we say to people to
>>> need to use paragraphs that contain lists, for example?
>
> So does Hixie's answer of "Tell them to use two<p>s and a<ul>". His
> answer has the benefit of not requiring any changes to HTML, and not
> introducing a fourth type of list that is only very subtly different
> from<ul>.
Am 15.06.2011 09:09 schrieb Jukka K. Korpela:
>
> <div class="p">
> <p>This is text, which may be just list header (introduction to
> the list) or a longer presentation.
> <ul>
> <li>an item</li>
> <li>another item</li>
> </ul>
> <p>Here we may have text that logically continues the discussion
> of the topic.</p>
> </div>
>
> * * *
>
> I know this suggestion is long and raw, but I hope its basic content
> is something we can agree on. And I have no big problem with using
> div markup here, even though it somewhat goes against the spirit of
> modern HTML.
This results in:
<div class="p">
<p>I always like to eat these cheeses:</p>
<ul>
<li>Cheddar</li>,
<li>Stilton</li>, and
<li>Red Lester</li>,
</ul>
<p>but I enjoy them most with one of these biscuits:</p>
<ul>
<li>wheat crackers</li>,
<li>rye crackers</li>,
<li>digestives</li>,
</ul>
<p>and some chutney.</p>
</div>
I don't like this, because it is a hackish workaround for a quite basic
problem. Lots of HTML is actually authored by non-programmers using
online rich text editors - both the editor softwares and their users
will be quite hard to teach about using such constructs. I strongly
assume that the following kind of solution is more likely to occur:
<p style="margin-bottom:0">I always like to eat these cheeses:</p>
<ul style="margin:0">
<li>Cheddar</li>,
<li>Stilton</li>, and
<li>Red Lester</li>,
</ul>
<p style="margin:0">but I enjoy them most with one of these biscuits:</p>
<ul style="margin:0">
<li>wheat crackers</li>,
<li>rye crackers</li>,
<li>digestives</li>,
</ul>
<p style="margin-top:0">and some chutney.</p>
The main issue here is the fact that you can't just apply styling to the
list element, but have to apply it to the surrounding <p>s, too. Inline
lists would make this kind of things definitely easier and better.
Of course I understand the benefit of not requiring any changes to HTML,
but actually the HTML5 process is about making changes to HTML. I don't
have a big problem with using this kind of markup either, but the same
applies for using <div>s instead of <article>s and <section>s.
More information about the whatwg
mailing list