web developer's blog

Posts Tagged ‘html

Definition lists – a natural solution?

leave a comment »

I’ve been recently using definition lists for many times. A little reminder:

Definition lists vary only slightly from other types of lists in that list items consist of two parts: a term and a description.

What does it remind to you as programmers? Does it remain you of the good, old “key-value”? I’m sure it should!

Whenever I browse page sources across the internet, I rarely find this kind of list, despite it brings your markup semantics on the higher level. It has positive impact on accessibility, because it helps understand the content in the way you really mean it on the semantic level. It has become really natural in use for me and I really recommend you start using it whenever you want to present pure term-definition or key-value pairs. I’m purposely ignoring here the visual possibility to interpret the information, as this argument fails on the accessibility field.

Definition lists: the dl , di , dt , and dd elements

Advertisements

Written by Leszek Stachowski

November 5, 2010 at 10:16 pm