Last published article
My take on ordered lists
Yesterday I was reading some articles from the excellent Opera Web Standards Curriculum (by the way, kudos Opera!) and I noticed that the index of their work was composed by several ordered lists, each one continuing its counting from its predecessor.
Now, setting the list to start counting from a value different than 1 (or, if you prefer, a., A., I., whatever) it is not possible anymore, if you care about XHTML validation. Before XHTML 1.0, there where two options to do that, one being the start attribute of the OL element, and the other, less obvious yet more powerful, a value attribute for the LI element.
Between the two options, I would rather go with the first. It’s the list that starts counting from one particular value, so the semantic information should belong to the list, not its items.
I understand the choice of removing those attributes. From an XML point of view a list that does not start from value 1 it is not the same list as the list that precedes it and that actually starts from value 1, as you need to have them in separate OL elements.
But this choice leaves my quite confused all the same. This, the fact of having an ordered list to start from a value different than 1, is a common typographic and logical need, so what I’m asking with this post is Was it really necessary to get rid of both attributes, since this behaviour isn’t replicable with any other technology we have at disposal, and since any alternative would lack semantic meaning?
.
From an author perspective, my answer is no. My two cents: it would make more sense to retain the start attribute, so that this ability is somehow preserved, and add another attribute, such as role in XHTML 2 to semantically link lists that would otherwise be separated entities.
<ol role="toc">
<li>item</li>
<li>item</li>
<li>item</li>
</ol>
<p>...</p>
<ol role="toc" start="4">
<li>item</li>
<li>item</li>
<li>item</li>
</ol>
Does that make at least little sense to you too?