[whatwg] List captions

Thomas Broyer t.broyer at gmail.com
Fri Apr 6 07:57:57 PDT 2007

2007/4/6, Andy Mabbett:
> >
> >We should do our best to avoid repeats of alt, title, and friends.
> Why?

Styling, text extraction (a.k.a. tag-stripping)

> >A list  header would go much better as a separate element, like
> ><caption> is for  tables.
> Like:
>         <ul>
>           <caption>Animals</caption> (or lh, or whatever)
>           <li>Cat</li>
>           <li>Dog</li>
>           <li>Horse</li>
>           <li>Cow</li>
>         </ul>
> Yes, that would work, too.

Problem: not backwards compatible (w.r.t. styling)
See this page with different browsers:

You can also try with <lh>, almost same results (much better in Firefox).

Better results with <p>, but not semantically a good choice.

Using an <ul> or <ol> nested inside a <dl> is not that bad after all...

Thomas Broyer

More information about the whatwg mailing list