XHTML strict & OL start=”xx”

26 Apr
2010

In XHTML strict, the ol-tag does not have the attribute start.

To get this working again, simply create a css-class

1
2
.counterList li {display: block }
.counterList li:before {content: counter(start) ". "; counter-increment: start}

and surround your list with a tag like this

1
2
3
4
5
6
7
<div class='counterList>
<ol style="counter-reset: start 4">
<li>this will be item 5</li>
<li>this will be item 6</li>
...
</ol>
</div>

I got this idea from http://www.timrivera.com/tests/ol-start.html

Comment Form

top