Captioned Lists

May 22, 2009

I love this structure:

<dl> <dt>Animals</dt> <dd>
</dd> </dl>

– Kevin Marks on [whatwg] List captions

It seems more correct than the alternative he proposes (with each of the li’s here as dd’s) in that the list is an ostensive definition, whereas each of the items is a mere example. Practically, it saves me from having to deal with some lousy CSS on nested lists. And it does feel more semantic-ish than the nested list (for this case) anyway, and certainly better than the usual headings or paragraphs inside lists.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: