How to Create Lists in HTML

checklist, clipboard, questionnaire-1622517.jpg

Here is a simple HTML list snippet.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HTML List Example</title>
</head>
<body>

    <h2>Ordered List</h2>
    <ol>
        <li>Item 1</li>
        <li>Item 2</li>
        <li>Item 3</li>
    </ol>

    <h2>Unordered List</h2>
    <ul>
        <li>Item A</li>
        <li>Item B</li>
        <li>Item C</li>
    </ul>

</body>
</html>

Here is the output.

Try out our online compiler below.

Leave a Comment

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