List Test Document
This is a document to display the various types of lists. It may be used
with different browsers to see how lists will look under different
systems. This document contains examples of:
Unordered lists
This is an unordered list. However, there are three types of lists that typically show up with bulleted items.
- Unordered lists
- Menu lists (deprecated)
- Directory lists (deprecated)
Unordered List Attribute: TYPE
This attribute allows you to specify the type of bullet used before each
list item. It was introduced by Netscape and is part of HTML 3.2.
Setting Bullet Types using Style Sheets
The list-style-type property can be used to control the appearance of the bullet in browsers that support style sheets.
Unordered list:
- disc is the default bullet
- list-style-type:none
- list-style-type:circle
- list-style-type:square
- list-style-type:square
- disc is the default bullet
- list-style-type:none
- list-style-type:circle
- list-style-type:square
Ordered list:
- decimal
- lower-roman
- upper-roman
- lower-alpha
- upper-alpha
If list-style-image is used and the image is not found it reverts to the default bullet character.
Ordered List: <OL>
Ordered lists are numbered lists. In the following example is a list of popular tomatoes.
- Beefsteak
- Better Boy
- Early Girl
- Roma
- Sweet 100
Ordered List Attributes: TYPE and START
Two attributes for ordered lists were added in HTML 3.2. These
attributes were introduced by Netscape, and are supported in most
versions of Netscape. However, most older browsers do not support these
attributes.
- START
- Specifies a starting number for the list. The default is 1
- TYPE
- Specifies the numbering style. Allowable values are:
- 1: Plain numbers (default).
- A: Capital letters
- a: Lowercase letters.
- I: Roman numbers in uppercase.
- i: Roman numbers in lowercase.
Here are some examples:
- TYPE=1 START=9
- Plain arabic numbers (the default), start at 9
- TYPE=A START=27
- Capital letters, start at 27.
- TYPE=a START=3
- Lower-case letters, start at 3
- TYPE=I START=30
- Upper-case Roman numerals, start at 30
- TYPE=i START=100
- Lower-case Roman numerals, start at 100
Menu List
A menu list is like an unordered list, but it is supposed to be
displayed in a more compact format. I've found that most browsers
display it exactly like an unordered list. Here is the same list used in
the unordered list section for comparison:
Another menu list example:
Some tomato pests are:
Directory List
A directory list typically shows up with each item bulleted. Items
should be no longer than 20 characters, and the HTML specification
recommends that browsers should try display them in two columns.
However, in my tests I have yet to find a browser that does
this. Here is an example directory list:
Tomato diseases include:
Cucumber Mosaic Virus
Fusarium Wilt
Verticillium Wilt
Tomato Spotted Wilt Virus
Definition Lists
Some unusual varieties of tomatoes include:
- Big Rainbow
- Fruit on this plant may grow up to 2 pounds. They have a rainbow coloring as they mature: green on the top, yellow in the middle and red on the bottom.
- Great White
- The tomatoes on this plant ripen to a pale yellow color, similar to that of a fresh pineapple.
- Purple Calabash
- Large "ruffled" fruit characterize this plant. Ripens to a dark, almost purple color.
Here is another example of a definition list:
- Ordered List
- A list in which each item is numbered
- Unordered List
- Lists in which each item is indicated by a bullet
- Definition List
- Lists which have a term followed by a definition. The
definition is usually offset by indentation and a carriage return.
Here is the same list with the COMPACT attribute set. Most browsers
do not seem to do anything special when the COMPACT attribute is used.
- Micro-Tom
- One of the smallest tomato plants. Mature plants are less than ten inches tall.
- Pear
- There are several types of pear-shaped cherry tomatoes. Two popular varieties are Red Pear and Yellow Pear.
- Tigerette Cherry
- A striking orange and red striped cherry tomato.
The same list without the COMPACT attribute:
- Micro-Tom
- One of the smallest tomato plants. Mature plants are less than ten inches tall.
- Pear
- There are several types of pear-shaped cherry tomatoes. Two popular varieties are Red Pear and Yellow Pear.
- Tigerette Cherry
- A striking orange and red striped cherry tomato.
LI Extensions
Unordered List Extensions
- Circle: <LI TYPE=CIRCLE>
- Square: <LI TYPE=SQUARE>
- Disc: <LI TYPE=DISC>
Ordered List Extensions
- Use capital letters: <LI TYPE=A>
- Use lower-case letters <LI TYPE=a>
- Use upper-case Roman numerals <LI TYPE=I>
- Use lower-case Roman numerals: <LI TYPE=i>
- Use regular numbers (default): <LI TYPE=1>
- Start numbers (or letters) at a specific number. In this
case, 10: <LI VALUE=10>
Nested Lists
It is possible to nest lists. For example, you can nest an unordered
list in an ordered list. Here are some examples:
- Paste Tomatoes
- Banana Legs
- Principe Borghese
- Roma
- Cherry Tomatoes:
- Gold Nugget
- Small Fry
- Sweet 100
You can also nest unordered lists within each other. Notice how some
browsers change the
bullets for each level:
LI Attributes
The TYPE attribute that affects bullet style for unordered
lists may also be applied to the LI tag within a list. Note that
use of this attribute with other list styles that use bullets may
also result in the same effect.
LI TYPE Attribute for UL
- Circle: <LI TYPE=CIRCLE>
- Square: <LI TYPE=SQUARE>
- Disc: <LI TYPE=DISC>
Here is the TYPE attribute used with a MENU list:
LI Attributes for OL: TYPE and VALUE
The TYPE attribute that affects numbering style for ordered lists may
also be applied to the LI tag within a list. the VALUE attribute may be
used to reset the numbering sequence (akin to the START attribute for
OL). Some examples:
- Use capital letters: <LI TYPE=A>
- Use lowercase letters <LI TYPE=a>
- Use uppercase Roman numerals <LI TYPE=I>
- Use lowercase Roman numerals: <LI TYPE=i>
- Use regular numbers (default): <LI TYPE=1>
- Start numbers (or letters) at a specific number. In this
case, 10: <LI VALUE=10>
Multiple Paragraphs in Lists
Items in lists may need to be longer than a single paragraph. You may separate paragraphs in a single list item through the use of the P tag. However, many browsers may display the item with a blank line between the paragraphs. This may look strange since many browsers do not place a blank line between items in a list. Another alternative is to separate paragraphs with a BR tag. However, you run the risk of obscuring your paragraph breaks if you choose this route. Take a look at this document in several different browsers to gain a better understanding of the ways that multiple paragraphs in a list are treated.
Unordered List
Items with Multiple-Paragraphs in an Ordered List
Items with Multiple-Paragraphs in an Definition List
- This is a definition list.
- I separate this definition item into two paragraphs using a P tag.
Here is the second paragraph in our first item.
- Now my second item.
- This definition item is divided into two sections using a second DD element.
- Here is the second DD element.
![[HTML CD Home Page]](../Images/cdthumb.gif)
Vivian Neou, vivian@catalog.com
Copyright © 1999 Vivian Neou