No announcement
 

Lists

HTML provides two types of lists: unordered lists (<ul>) and ordered lists (<ol>). List items are denoted by the <li> tag within the list container tags.

Example:

list.html

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>My Webpage</title>
</head>
<body>
    <h2>List Examples</h2>
    <ul>
        <li>Unordered List Item 1</li>
        <li>Unordered List Item 2</li>
    </ul>

    <ol>
        <li>Ordered List Item 1</li>
        <li>Ordered List Item 2</li>
    </ol>
</body>
</html>

Output

List Examples

  • Unordered List Item 1
  • Unordered List Item 2
  1. Ordered List Item 1
  2. Ordered List Item 2

Unordered lists are typically displayed with bullet points, while ordered lists are displayed with sequential numbers or letters.