Understanding Lists - HTML

All lists, whether ordered, unordered, or definition, share similar elements. Each HTML list has the following structure:

Note Definition lists are slightly different in syntax because they have an item tag (<dt> or “definition term”) and a definition description tag (<dd>). See the Definition Lists section later in this chapter for more information.

For each list you need the list opening tag, a corresponding closing tag, and individual item tags (paired; open and close). Each type of list has its own display format:

  • An ordered list precedes its items with a number or letter.
  • An unordered list precedes its items with a bullet (as in this list).
  • A definition list has two pieces for each item, a term and a definition.

The ordered and unordered lists have many different display options available:

✦ Ordered lists can have their items preceded by the following:

  • Arabic numbers
  • Roman numerals (upper- or lowercase)
  • Letters (upper- or lowercase)
  • Numerous other language-specific numbers/letters
  • Unordered lists can have their items preceded by the following:
  • Several styles of bullets (filled circle, open circle, square, and so on)
  • Images

More information on the individual list types is provided in the following sections.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

HTML Topics