Re: [whatwg] Suggest making <dt> and <dd> valid in <ol>

On Wed, Aug 1, 2012 at 9:26 AM, Ian Yang <ian@invigoreight.com> wrote:

>
>  > Like above examples, the following <dl> is not well organized, and it's
>> > also a pain to read it:
>> >
>> > <dl>
>> >     <dt>Lorem Ipsum</dt>
>> >     <dd>Sit amet, consectetur adipiscing elit.</dd>
>> >     <dt>Aliquam Viverra</dt>
>> >     <dd>Fringilla
>>        [... etc ...]
>> > </dl>
>> >
>> > If developers could, *optionally*, use <li> to wrap each group, the code
>> > would be more organized:
>> >
>> > <dl>
>> >     <li>
>> >         <dt>Lorem Ipsum</dt>
>> >         <dd>Sit amet, consectetur adipiscing elit.</dd>
>> >     </li>
>> >     <li>
>> >         <dt>Aliquam Viverra</dt>
>> >         <dd>Fringilla nulla nunc enim nibh, commodo sed cursus in.</dd>
>> >     </li>
>>    [...]
>> > </dl>
>> >
>> > And usually "life cycle" type contents are presented as circles. Without
>> > <li>(s), it will be hard to style them.
>>
>> How about the following method - essentially a variant of
>> <ol><li><dfn>Egg</dfn>: A white egg. [etc]</ol>, as proposed by by Ian:
>
>
>> <ol><li><figure><figcaption>Lorem Ipsum</figcaption>
>>           Sit amet, consectetur adipiscing elit.
>>         </figure></li>
>>     <li><figure><figcaption>Aliquam Viverra</figcaption>
>>           Fringilla nulla nunc enim nibh, commodo
>>           sed cursus in.</figure></li></ol>
>>
>> Or, if one wishes, one could drop the <ol><li>…</li></ol> completely
>> and  instead e.g. do the following:
>>
>> <style>figure figure{display:list-item}</style></head><body>
>> <figure>
>>         <figure>
>>           <figcaption>Lorem Ipsum</figcaption>
>>           Sit amet, consectetur adipiscing elit.
>>         </figure>
>>         <figure>
>>           <figcaption>Aliquam Viverra</figcaption>
>>           Fringilla nulla nunc enim nibh, commodo
>>           sed cursus in.
>>         </figure>
>> </figure>
>>
>
> They looks fancy. However, I have a feeling that a "life cycle" should be
> a "definition list", and the above examples don't possess the meaning
> "definition list". I'm not sure if I'm correct or not. Let me know if I'm
> not.
>
>
> Sincerely,
> Ian Yang
>

Sorry, after reconsideration, I think it's okay to use <ol>.

I was wrong to assume that all life cycles have "definition term" and
"definition description" pairs. After some googling, I found that some life
cycles have only terms and don't have descriptions.

So when there are only terms, it's okay to use:

<ol>
    <li>Egg<li>
    <li>Caterpillar<li>
    ......
    ......
</ol>

However, <dfn> examples I could found only use it in normal paragraphs. I'm
not sure if that's appropriate to put it in list items like
<li><dfn>term</dfn>: blablabla</li>. And besides, the unwanted colon can
causes styling inconveniences :-P

http://www.w3.org/wiki/HTML/Elements/dfn

http://reference.sitepoint.com/html/dfn


Sincerely,
Ian Yang

Received on Wednesday, 1 August 2012 02:00:23 UTC