Alex Rivera | Logout

Is it possible to specify a starting number for an ordered list?

Asked 2009-04-22T20:19:52.717
154

I have a ordered list where I would like the initial number to be 6. I found that this was supported (now deprecated) in HTML 4.01 using the start attribute. In this specification they say that you can instead specify the starting integer by using CSS.

How would you specify the starting number with CSS?

Edit
Report

1 Answer

204

If you need the functionality to start an ordered list (OL) at a specific point, you'll have to specify your doctype as HTML 5; which is:

<!doctype html>

With that doctype, it is valid to set a start attribute on an ordered list. Such as:

<ol start="6">
  <li>Lorem</li>
  <li>Ipsum</li>
  <li>Dolor</li>
</ol>

answered 2009-04-22T20:25:50.580

Your Answer