In this article, we will be looking at how to create lists in HTML. There are two types of lists, ordered lists whereby the items in the lists don’t have a particular order and then there are ordered lists where the items are ordered in an ordered manner.
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.