Webmaster Secrets logo
Restarting a Numbered List
By Brett McCarron, webmaster
The Blame Productions


Photo credit: (C) 2000 The Blame Productions Ordered lists are a convenient way to create order from chaos on the web. When you need to start a sequence with a certain number or letter, use this method. It's fast and efficient. Read on and I'll show you how.

The typical ordered list assumes that you wish to start with the first number of a sequence and proceed in order, such as 1,2,3 (default); A,B,C; a,b,c; I,II,III; or i, ii, iii. Ordered lists work fine in these cases.

In figure 1 the TYPE command forces the browser to display a particular type of ordered list. In this case, we want the sublisted items in 1,2,3... sequence, with A,B,C as the sequence for the sub-listed items. Of course, we could have used a, i, or I as valid TYPEs, too.


HTML code: <OL>
<LI>This is the first item.
     <OL TYPE=A>
     <LI>This is the first sub-item.
     <LI>This is the second sub-item.
     </OL>
<LI>This is the second item.
</OL>

 

Interpreted as:   
  1. This is the first item.
    1. This is the first sub-item.
    2. This is the second sub-item.
  2. This is the second item.

Example 1: Regular ordered list.


But once in awhile you need to override the default settings. It may be for artistic reasons (such as using a sponsor's name to spell out a message with large capital letters) or it may be because you have started the ordered list inside a table and need to start a second list that picks up where the first left off.

This is handled in HTML via an ordered list with the START switch. The default for START is 1, or the first item of the series (1, A, I, a, etc.). The only tricky part with using START is that the value must be numeric. Thus, if you are using a TYPE of i and want the list to start with a small Roman numeral iv, you use a START value of 4 -- not iv -- to produce the desired result. Or if you have TYPE set to A and you wish the list to start with F, you choose a START value of 6, not F.

Now take a look at Example 2, which shows an example of an artistic use for this tip. Experiment with it so that you'll know how to use it when the time comes. My sincere apologies to Will Shakespeare for this example. Et tu, Brute!


HTML code: <OL TYPE=1 START=2>
<LI>This is item 1, but shows as number 2 (on purpose).
     <OL TYPE=A START=2>
     <LI>This sub-item should show as B.
     </OL>

OR NOT
</OL>

<OL TYPE=1 START=2>
     <LI>This is item 1 of the new list, but starts at 2 (on purpose).
     <OL TYPE=A START=2>
     <LI>This sub-item should show as B.
     </OL>
</OL>

 

Interpreted as:   
  1. This is item 1, but shows as number 2 (on purpose).
    1. This sub-item should show as B.

    OR NOT

  1. This is item 1 of the new list, but starts at 2 (on purpose).
    1. This sub-item should show as B.

Example 2: Ordered list with defined start (2.B. OR NOT 2.B.)



Webmaster Secrets



Copyright © 1996-2017 Blamepro.com
Trademarks and copyrights used herein are the property of their respective holders.