W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2009

[whatwg] List Headers

From: Markus Ernst <derernst@gmx.ch>
Date: Thu, 05 Feb 2009 09:18:03 +0100
Message-ID: <498AA0BB.9030501@gmx.ch>
Benjamin Hawkes-Lewis schrieb:
> On 4/2/09 20:39, Garrett Smith wrote:
>>   <ol style="list-style-type: iroha">
>>     <lh>Dry:</lh>
>>       <li>1c flour</li>
>>       <li>1/4c sugar</li>
>>       <li>1tsp baking soda</li>
>>     <lh>Wet:</lh>
>>       <li>1 egg</li>
>>       <li>1/2c milk</li>
>>       <li>1tsp vanilla extract</li>
>>    </ol>
> 
> Hmm.
> 
> Does that markup solve any user problems that following traditional, 
> markup does not?
> 
>    <ol style="list-style-type: iroha">
>      <li class="list-header">Dry:
>        <ol>
>            <li>1c flour</li>
>            <li>1/4c sugar</li>
>            <li>1tsp baking soda</li>
>        </ol>
>      </li>
>      <li class="list-header">Wet:
>        <ol>
>            <li>1 egg</li>
>            <li>1/2c milk</li>
>            <li>1tsp vanilla extract</li>
>        </ol>
>      </li>
>     </ol>

A different use case in the same problem field: Often you have lists 
that are actually part of a paragraph, but cannot be correctly 
associated with the paragraph:

<p>Text before ...</p>
<p>There are lots of fruits available, e.g.:</p>
<ul>
   <li>Apples</li>
   <li>Pears</li>
</ul>
<p>More Text...</p>

More appropriate markup for this could be achieved with the LH suggestion:

<p>Text before ...</p>
<ul>
   <lh>There are lots of fruits available, e.g.:</lh>
   <li>Apples</li>
   <li>Pears</li>
</ul>
<p>More Text...</p>

Anyway I would consider it even more appropriate to allow the list 
inside a paragraph:

<p>Text before ...</p>
<p>There are lots of fruits available, e.g.:
   <ul>
     <li>Apples</li>
     <li>Pears</li>
   </ul>
</p>
<p>More Text...</p>

But I admit I have no idea what other problems this could cause.
Received on Thursday, 5 February 2009 00:18:03 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:09 UTC