W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2007

[whatwg] List captions

From: Kevin Marks <kevinmarks@gmail.com>
Date: Tue, 10 Apr 2007 17:20:12 -0700
Message-ID: <73766b160704101720h3ac6d9d5mb411db4a480680f3@mail.gmail.com>
On 4/6/07, Elliotte Harold <elharo at metalab.unc.edu> wrote:
> Andy Mabbett wrote:
> > How often do we see something like:
> >
> >         <p>Animals:</p>
> >         <ul>
> >           <li>Cat</li>
> >           <li>Dog</li>
> >           <li>Horse</li>
> >           <li>Cow</li>
> >         </ul>
> >
> > This would be more meaningful as:
> >
> >         <ul caption="Animals">
> >           <li>Cat</li>
> >           <li>Dog</li>
> >           <li>Horse</li>
> >           <li>Cow</li>
> >         </ul>
> >
>
> No, the caption should be displayed to all users. That means it needs to
> be element content, not an attribute value. Just maybe
>
>          <ul>
>            <caption>Animals</caption>
>            <li>Cat</li>
>            <li>Dog</li>
>            <li>Horse</li>
>            <li>Cow</li>
>          </ul>

Seems to me that what you want semantically is:

<dl>
  <dt>Animals</dt>
  <dd>Cat</dd>
  <dd>Dog</dd>
  <dd>Horse</dd>
  <dd>Cow</dd>
</dl>

or maybe

<dl>
  <dt>Animals</dt>
  <dd><ul>
  <li>Cat</li>
  <li>Dog</li>
  <li>Horse</li>
  <li>Cow</li>
  </ul></dd>
</dl>

if you're feeling XOXO-esque
Received on Tuesday, 10 April 2007 17:20:12 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:54 UTC