Starting number for HTML lists

by John on February 4, 2009

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.

{ 1 trackback }

Google Reader and HTML lists — The Endeavour
02.05.09 at 06:26

{ 2 comments… read them below or add one }

1

Mark Reid 02.05.09 at 03:27

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

Thomas Guest 02.05.09 at 04:51

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.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>