[whatwg] [HTML5] Named start values for lists?

Thomas Broyer t.broyer at gmail.com
Wed Nov 7 23:44:57 PST 2007

2007/11/8, Ian Hickson:
> On Mon, 26 Jun 2006, dolphinling wrote:
> >
> > HTML5 brings back the |start| attribute on ordered lists. This allows a
> > list to semantically start with a number other than one. It seems like
> > the major use case for this is to split lists up, so that a single list
> > is marked by multiple <ol>s.
> >
> > Would it therefore make sense to allow named start values, so that the
> > author doesn't have to go through and re-number everything when a new
> > item is added at the top? And if so, should they be considered
> > semantically one list? And if so, would it make sense for it to also
> > apply to unordered lists, so that they can be split up, too?
> I'm not sure we can put non-numeric values in start="", but I agree with
> your basic proposal. I'm not sure it makes sense for us to add it to HTML5
> at this time -- we have a number of semantic things already added to the
> spec and we don't want to get too far ahead of implementations otherwise
> they'll all start doing different parts and it'll take years to get a
> common subset implemented -- but I think it's something we should consider
> for a future version, certainly.

Semantics put aside (start="" is not really semantic, is it? or why
are counters part of CSS?), you can achieve this using a counter() in

ol.mysplitlist1 {
  list-style: none;
body {
  counter-reset: mysplitlist1;
ol.mysplitlist1 > li:before {
  content: counter(mysplitlist1) ". ";
  counter-increment: mysplitlist1;
<ol class=mysplitlist1>
<li>First item
<ol class=mysplitlist1>
<li>Second item

See it in the Live DOM Viewer, tested working in Firefox 2, Opera
9.24, Safari 3.0.3, doesn't work in IE7:

IMO, the thing to consider for the HTML.next is to add semantic to
replace "the lists share the same class" with "the lists are part of
the same overall list"; for both UL and OL (and DL and DIALOG).

Thomas Broyer

More information about the whatwg mailing list