Friday, July 4, 2008

Ordered List Numbering Tricks

How do you start an ordered list from, say, 10? Put start="10" in the <ol> tag.
How do you change the numbering of an ordered list mid-way? Put value="number" in the <li> tag, where number is the number you want inserted.

One caveat: These attributes will cause your XHTML1-strict document to invalidate. The XHTML1-transitional DTD accepts these attributes.
The only standard-compliant way to do the above is to use an unordered list and insert the odd-ball numbers using css.

No comments: