Lists

The three list types you can create are ordered, unordered and definition.


Ordered List Unordered List Definition List
  1. Knead the dough
  2. Roll the dough
  3. Add toppings
  4. Bake in oven
  • bread
  • milk
  • cheese
  • eggs
  HTML
 HyperText Markup Language
  CSS
 Cascading Style Sheet


Unordered and Ordered List Tags

Unordered list <ul> </ul>

Ordered list <ol> </ol>

The tags to list the items <li></li>


Unordered List
<ul>
<li>bread</li>
<li>milk</li>
<li>cheese</li>
<li>eggs</li>
</ul>

Displays

  • bread
  • milk
  • cheese
  • eggs

Ordered List
<ol>
<li>Knead the dough</li>
<li>Roll the dough</li>
<li>Add toppings</li>
<li>Bake in oven</li>
<ol>

Displays

  1. Knead the dough
  2. Roll the dough
  3. Add toppings
  4. Bake in oven


Definition List Tags

A definition list contains a term and a description. You can use them in glossaries or FAQ(frequently asked questions).

<dl>Start of Defintion list
<dt>Definition term<dt>
<dd>Definition description<dd>
</dl>End of Definition list




Example

<dl>
<dt>HTML</dt>
<dd>Stands for HyperText Markup Language. The language used for writing web pages. </dd>
<dt>Browser</dt>
<dd>A software that allows you to view web pages.</dd>
</dl>





Displays

HTML
Stands for HyperText Markup Language. The language used for writing web pages.
Browser
A software that allows you to view web pages.



Now do the Exercise!