Starting number for HTML lists

I recently found out how to make an HTML list start numbering somewhere other than at 1. This is handy when you have a list interrupted by some text and want to continue the original numbering without starting over. I’ve only been using HTML for 15 years. Maybe one of these days I’ll really learn it.

In the <ol> tag, add the attribute start="7", for example, to make the list start numbering with 7.  The start attribute can be any integer, even negative.

For example, the seven dwarfs are

  1. Dopey
  2. Grumpy
  3. Doc
  4. Happy
  5. Bashful
  6. Sneezy

and last but not least

  1. Sleepy.

Update: As pointed out in the comments below, the example in this post may not render correctly in your reader. See this post for a discussion of the problem.

2 thoughts on “Starting number for HTML lists

  1. I didn’t know about that attribute either and I’ve been using HTML for nearly as long.

    Interestingly (and a little annoyingly) Google Reader seems to ignore that attribute. When I viewed this post using it Sleepy had the number 1 in front of his name.

  2. Thanks for the tip. I didn’t know that. Sadly it didn’t work properly in my feed reader (Google reader, and I’m not sure what went wrong!). I’ve been wondering in general about styling and feed readers. On the one hand, I quite like the uniform style applied by a feed reader when I’m browsing new material: I can always visit an item I find interesting. Certainly I prefer it when authors deliver full feed content in their feeds. But there are times when, as an author, I’d like to be sure styling gets through – e.g. if I was using CSS to position objects in an animation.

Comments are closed.