home Designing Webpages
Ka-Neng Au
HOME
INTRODUCTION
LAYOUT
FORMAT
LINKS
LISTS
TABLES
BACKGROUNDS
IMAGES
NAVIGATION

LISTS

HTML provides a number of ways to create lists of items. These include bulleted lists, numbered lists and definition lists. Lists can also be nested.

HTML CodeResult
Unordered List (ul) Example <ul> <li>This is the first item </li> <li>This is the second item </li> <li>This is the last item </li> </ul> Unordered List (ul) Example
  • This is the first item
  • This is the second item
  • This is the last item
Ordered List (ol) Example <ol> <li>This will be item 1 </li> <li>This will be item 2 </li> <li>This will be item 3 </li> </ol> Ordered List (ol) Example
  1. This will be item 1
  2. This will be item 2
  3. This will be item 3
Definition List (dl) Example <dl> <dt>dt </dt> <dd>definition term </dd> <dt>dd </dt> <dd>definition definition </dd> </dl> Definition List (dl) Example
dt
definition term
dd
definition definition

Exercise:

<center> <h2>My Webpage</h2> </center> <strong>Nested List (ul/ol) Example</strong> <ul> <li>Get in the Car </li> <ol> <li>Put key in door lock. Turn to unlock </li> <li>Pull on door handle </li> <li>Sit down in driver's seat </li> </ol> <li>Start the car </li> <ol> <li>Put key in ignition </li> <li>Turn key to Start position </li> <li>Hold until car starts </li> <li>Let go of key when car has started </li> </ol> </ul>
This page was last updated 24 March 2004.