HTML – Lists

A HTML list is composed of two types of tag

List Type

This tag tells the browser what type of list we will be displaying. the two main types are

Unordered List <ul></ul>, this list displays bullet point. It is used when you do not want to give a ranking to the list items.

  • Item 1
  • Item 2
  • Item 3

Ordererd List<ol></ol>, this list is numbered. This is used when you want to give a ranking to the pages.

  1. Item 1
  2. Item 2
  3. Item 3

List Item

The list type must be placed around the List Item <li></li>, the browser will then display the items with the format specified from the list type.

Unordered List example

<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>

Ordered List example

<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ol>

Leave a Reply

Your email address will not be published. Required fields are marked *