views:

24

answers:

2

So, according the W3C spec, the 'start' attribute in an ordered list is deprecated.

If you want to continue a list that's been broken up by a series of heading, you might have:

<ol start="15"> 

But that would not be allowed. The questions is how else could you/would you do it other than that which works in current browsers? Mission impossible?

+1  A: 

The start attribute may be deprecated for HTML4.01, but it has returned for HTML5. Is there a browser compatibility issue?

EDIT: SitePoint says no. So the only real issue is validation. You can use HTML 4.01 Transitional, or HTML5, but not Strict, if you're really concerned about validation.

Otherwise, you're stuck with having the other lines in the HTML and hiding them.

<style type="text/css">.hidden { display: none }</style>

<ol>
    <li class="hidden"></li>
    <li class="hidden"></li>
    <li class="hidden"></li>
    <li class="hidden"></li>
    <li>Starting at 5</li>
</ol>
Matchu
A: 

You can do it with CSS counters, but they are not supported in all browsers. The start attribute is your best bet after all.

Emil Vikström