HTML Lists are used to display items as a list.

HTML Lists

There are two kinds of lists HTML supports.

  • Ordered List
  • Unordered List

Ordered List

Ordered lists are numbered lists. The serial numbers could be decimals, roman numerals, alphabets, etc.

<ol> is the tag used to define HTML Ordered List. Inside an ordered list, the list items are defined using <li> tag.

The following is a simple example of ordered list.

index.html

<!DOCTYPE html>
<html>
<head>
</head>
<body>
 
  <ol>
     <li>First Item</li>
     <li>Second Item</li>
     <li>Third Item</li>
     <li>Fourth Item</li>
  </ol>
  
</body>
</html>

Unordered List

Unordered lists are bulleted lists.

<ul> is the tag used to define HTML Unordered List. Inside an ordered list, the list items are defined using <li> tag.

The following is a simple example of unordered list.

index.html

<!DOCTYPE html>
<html>
<head>
</head>
<body>
 
  <ul>
    <li>First Item</li>
    <li>Second Item</li>
    <li>Third Item</li>
    <li>Fourth Item</li>
  </ul>
  
</body>
</html>