Create a List in a Web Page Using HTML

Introduction 

HTML stands for HyperText Markup Languages. HTML is the basic building block of web pages in the World Wide Web. HTML is not a programming language, it is for markup languages running in a web browser.

We can create numbered and bullet lists on a web page using the list tag. There are basically three types of list tag:

  • Ordered List – To create a list of related items, using numbered order.
  • Unordered List – To create a list of related items, using bullet order.
  • Definition List – To create a list of defining the terms.

Ordered List <ol>

The List is created by <ol> tag and closes the </ol>. Ordered list is listed by numbering one by one. The <li> this tag is listing the items in the ordered list and the close list tag </li>. In the ordered list using numbered order.

Example:

<html>  
<head>  
<title>ordered list</title>  
</head>  
<body>  
<ol>  
<li>c </li>  
<li>c++ </li>  
<li>Java</li>  
<li>Python</li>  
<li>Javascript</li>  
</ol>  
</body>  
</html>

Unordered List <ul>

The list is created by <ul> tag and close tag</ul>. The unordered list is represented by a Bullet symbol. It is also called a bulleted list, the <ul> list starts with <li> .

<html>  
<head>  
<title>ordered list</title>  
</head>  
<body>  
<ul>  
<li>c </li>  
<li>c++ </li>  
<li>Java</li>  
<li>Python</li>  
<li>Javascript</li>  
</ul>  
</body>  
</html>

Definition list<dl>

There are three list tags given below:

<dl></dl> - Definition list
<dt></dt> - Definition Term
<dd> <dd/>- Data Definition (Description)

<html>  
<body>  
<p> Definition list </p>  
<dl>  
<dt>Apple</dt>  
<dd> is a Healthy Fruit</dd>  
<dt>HTML</dt>  
<dd> is a Markup Languages</dd>  
<dt>Javascript</dt>  
<dd> is a Scripting languages</dd>  
<dt>Vijay</dt>  
<dd> is a good boy</dd>  
</dl>  
</body>  
</html>

Conclusion

Creating a list is simple and easy, and I think this is useful for you. In my next blog, I will show creating tables and links.