Webmaster

HTML : Text formatting
Contents ]
Jérôme Versavel

Lists

To list various items in a category or the successive steps in a workshop, HTML provides two sorts of lists: unordered ones (often rendered with bullets) and ordered ones (rendered with a numbering).

A bulleted list is set by the <UL> tag, and each item is defined by the <LI> tag.

The following code:

<UL>
<LI>Red</LI>
<LI>Green</LI>
<LI>Blue</LI>
</UL>

produces the following result:

  • Red
  • Green
  • Blue
To define numbered lists, use the <OL> tag. The same <LI> tag is used to define each list item.

The following code:

<OL>
<LI>Yellow</LI>
<LI>Cyan</LI>
<LI>Magenta</LI>
</OL>

displays as follows:

  1. Yellow
  2. Cyan
  3. Magenta
Nested lists. A list item can also be a list in its own right, as shown in this table of contents example:

  1. Webmaster
    • Tips
    • Site selection
    • Lab books
    • Folders
  2. Newsmag



  1   2   3   4   5   6   7