HTML offers mainly 2 ways for specifying lists of information. These lists allow web developers to group a set of related items in lists.
<ol>
- Ordered list<ul>
- Unordered listAn unordered list is a collection of related items that have no special order or sequence. This list is created by using HTML <ul>
tag. Each item in the list is marked with a bullet.
<!DOCTYPE html>
<html>
<head>
<title>HTML Unordered List</title>
</head>
<body>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li>React</li>
</ul>
</body>
</html>
This will produce the following result −
HTML
CSS
JavaScript
React
If you are required to put your items in a numbered list instead of bulleted, then HTML ordered list will be used. This list is created by using <ol>
tag.
<!DOCTYPE html>
<html>
<head>
<title>HTML Unordered List</title>
</head>
<body>
<ol>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li>React</li>
</ol>
</body>
</html>
This will produce the following result −
HTML
CSS
JavaScript
React