LIST

List

HTML offers mainly 2 ways for specifying lists of information. These lists allow web developers to group a set of related items in lists.

  1. <ol> - Ordered list
  2. <ul> - Unordered list

Unordered List :

An 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.

Example :

<!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

Ordered List :

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.

Example:

<!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 −

  1. HTML
  2. CSS
  3. JavaScript
  4. React