[thelist] <ol> just for lists where order in important

Matt Warden mwarden at gmail.com
Mon Feb 13 14:57:05 CST 2006


On 2/13/06, Geoffrey Sneddon <foolistbar at googlemail.com> wrote:
> Hi,
>
> One of the few things I'm not sure about after reading the HTML spec
> is whether a <ol> should be used just when order in important (eg. a
> recipe) or when there is any order (eg. members listed alphabetically).
>
> Which is correct, or is it just a grey area in the HTML spec?

I think it becomes clearer when you consider the semantics of ul
(unordered list). A ul is for list items for which order does not make
sense or for which there is arbitrary order.

If for example I retrieved a list of users out of a database and
displayed them, I would use a ul.

If I retrieved the same list of users but sorted them by last login
date, I would use a ol. Note here that the sort item is not displayed
in the list. This is a point that many people would contend (i.e.,
they would say that a ol should be used only when the sort key is the
list item itself).

--
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.



More information about the thelist mailing list