The HTML approach:
<ol start="34">
<li>apple</li>
<li>pear</li>
<li>car</li>
</ol>
this is deprecated in HTML4 in favour of CSS generated content:
<style type="text/css">
.mylist { counter-reset: mycounter 34; }
.mylist li { counter-increment: mycounter; list-style-type: none; }
.mylist li:before { content: counter(mycounter) ". "; }
</style>
<ol class="mylist">
<li>apple</li> ...
</ol>
This has some advantages in that you can also let a list run through without resetting (for if you have 33 other things in a previous list). However it doesn't work in IE6/IE7 so you can forget it for now.
The deprecation of <ol start>
(and <li value>
) is a matter of some controversy. Many (myself included) believe it to have been a mistake, as the list number is closer to content than presentation in the common case of a continued list. Whilst the HTML hack is admittedly nasty, IMO the CSS workaround is worse.
Anyhow, HTML5 re-includes these attributes so they are not going away. If continued <ol>
s are a necessity, I'd stick with the HTML start
/value
attributes, and use either the HTML4/XHTML1 Transitional DOCTYPE or the HTML5 one.