Make your own free website on Tripod.com

LESSON 4: Lists

  1. What is a list?
  2. Element OL (Ordered List).
  3. Element UL (Unordered List).
  4. Element LI (List Item).
  5. Examples.

1. What is a list?

A list may look like this:

A list may contain any number of sub-lists.
Go to Top


2. Element OL (Ordered List).

\..........Description

The OL element defines an ordered list. The element contains one or more LI elements that define the actual items of the list.

\..........Syntax

<OL
     START="number"
     TYPE="A"|"a"|"I"|"i"|"1">
.....
</OL>

\..........Attributes

Attribute Description
START="number" Specifies the starting number of the list.
TYPE= "A"
"a"
"I"
"i"
"1"
Specifies the numbering style of the list.

A - uppercase alphabetic;
a - lowercase alphabetic;
I - uppercase Roman numerals;
i - lowercase Roman numerals;
1 - decimal numbers. Used by default.

\..........Examples to see

Example 1 demonstrates use of the OL element. Go to Top


3. Element UL (Unordered List).

\..........Description

The UL element defines an unordered list. The element contains one or more LI elements that define the actual items of the list.

\..........Syntax

<UL TYPE="disc"|"circle"|square">
.....
</UL>

\..........Attributes

Attribute Description
TYPE= "disc"
"circle"
"square"
Specifies the style of bullets preceding list items.
  • disc - a filled-in circle;
  • circle - a circle outline;
  • square - a square;

\..........Examples to see

Example 2 demonstrates use of the UL element.
Go to Top


4. Element LI (List Item).

The LI element defines a list item. The element must be contained within OL or UL.

\..........Syntax

<LI
     TYPE="disc"|"circle"|"square"|"A"|"a"|"I"|"i"|"1"
     VALUE="number" >
.....
</LI>


The end tag </LI> may be omitted.

\..........Attributes

Attribute Description
TYPE= "disc"
"circle"
"square"
"A"
"a"
"I"
"i"
"1"
Specifies the style of list item marker.

disc - a filled-in circle;
circle - a circle outline;
square - a square;
A - uppercase alphabetic;
a - lowercase alphabetic;
I - uppercase Roman numerals;
i - lowercase Roman numerals;
1 - decimal numbers.
VALUE="number" Specifies the number of LI when used with an OL. VALUE allows changes in the sequence number of LI.

\..........Examples to see

Examples 1 and 2 demonstrate use of LI element.
Go to Top


5. Examples.

Choose an example and move below the text box to see the HTML code.

Example 1: Creating an ordered list.
Example 2: Creating an unordered list.
Preview
Go to Top