myatari.net

[ MyAtari Advert ]

 Home | E-mail


HTML Basics - Part 4 of 12
by Matthew Bacon

Lists
Lists allow important data/information to be presented in a clear and easy-to-read manner. HTML allows three main types.

  1. Unordered, also known as a bullet list, uses <UL>
  2. Ordered, also known as a numbered list, uses <OL>
  3. Definition uses <DL>

<UL>, <OL> and <DL> are the tags that define the type of list. The entries in bullet and numbered lists use the tag <LI>, while entries in a definition list use the tag <DT>.
 

For example,

<UL>
<LI>first list item
<LI>second list item
<LI>third list item
</UL>

... would be displayed as,

  • first list item
  • second list item
  • third list item
<OL>
<LI>first list item
<LI>second list item
<LI>third list item
</OL>
  1. first list item
  2. second list item
  3. third list item
<DL>
<DT>first list item
<DT>second list item
<DT>third list item
</DL>
first list item
second list item
third list item


In the examples below, lists are nested within lists and different types of lists have been created.
 

For example,

<OL TYPE=1>
<LI>first list item
   <OL TYPE=i>
   <LI>first item
   <LI>second item
   </OL>
<LI>second list item
   <OL TYPE=I>
      <LI>third item
      <LI>forth item
   </OL>
<LI>third list item
   <OL TYPE=a>
      <LI>fifth item
      <LI>sixth item
   </OL>
</OL>
<LI>forth list item
   <OL TYPE=A>
      <LI>seventh item
      <LI>eight item
   </OL>
</OL>

... would be displayed as,

  1. first list item
    1. first item
    2. second item
  2. second list item
    1. third item
    2. forth item
  3. third list item
    1. fifth item
    2. sixth item
  4. forth list item
    1. seventh item
    2. eigth item

 

 

<UL TYPE=DISC>
<LI>first list item
   <UL TYPE=CIRCLE>
      <LI>first item
      <LI>second item
   </UL>
<LI>second list item
   <UL TYPE=SQUARE>
      <LI>third item
      <LI>forth item
   </UL>
</UL>
  • first list item
    • first item
    • second item
  • second list item
    • third item
    • forth item

 

Previous

Next


MyAtari magazine - Tutorial #4, April 2001

Current Issue
-
Contents
-
Features
-
Reviews
-
Tutorials
-
Regulars
-
Adverts

[ Top of page ]

 

Copyright © 2001 MyAtari