HTML List

HTML List is also used to decorate text or data in sequence one by one.

HTML List Example

  • item
  • item
  • item
  • item

Mainly there are two types of HTML List.

1. Ordered HTML List

2. Unordered HTML List

Ordered HTML List

This is the first type of list. The list items in the Ordered HTML List are marked with a default number (1, 2, 3 ….).

Example

<!DOCTYPE html>
<html>
<body>

<ol>
  <li>Papaya</li>
  <li>Kiwi</li>
  <li>Banana</li>
  <li>Cherry</li>
  <li>Pear</li>
  <li>Boysenberry</li>
</ol> 

</body>
</html>

Output:

1.Papaya
2.Kiwi
3.Banana
4.Cherry
5.Pear
6.Boysenberry

Unordered HTML List

This is the second type of list. The list items in the Unordered HTML List are marked by default with the bullets (small black circle).

Example

<!DOCTYPE html>
<html>
<body>

<ul>
  <li>Papaya</li>
  <li>Kiwi</li>
  <li>Banana</li>
  <li>Cherry</li>
  <li>Pear</li>
  <li>Boysenberry</li>
</ul> 

</body>
</html>

Output

  • Papaya
  • Kiwi
  • Banana
  • Cherry
  • Pear
  • Boysenberry