Lists - Unordered, Ordered

HTML supports five types of lists. A list is first marked with the start and end list tag and then each list item is indicated with a list item tag <LI> (unless it is a definition list). List item tags have end tags, but they are optional since a new list item tag implies the end of the previous item. Lists may be nested and if they are nested lists are indented farther than their parent list when displayed. Any type of list can have a compact attribute, which forces the list items closer together both horizontally and vertically.

Unordered List: <UL>

A list of items which may appear in any particular order. It is usually displayed as a bulleted list of items.

Ordered List: <OL>

A list of items to be displayed in a particular order. These are usually numbered when displayed.

  1. Apples
  2. Oranges

Next Slide