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:
  1. <html>  
  2. <head>  
  3. <title>ordered list</title>  
  4. </head>  
  5. <body>  
  6. <ol>  
  7. <li>c </li>  
  8. <li>c++ </li>  
  9. <li>Java</li>  
  10. <li>Python</li>  
  11. <li>Javascript</li>  
  12. </ol>  
  13. </body>  
  14. </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> .
  1. <html>  
  2. <head>  
  3. <title>ordered list</title>  
  4. </head>  
  5. <body>  
  6. <ul>  
  7. <li>c </li>  
  8. <li>c++ </li>  
  9. <li>Java</li>  
  10. <li>Python</li>  
  11. <li>Javascript</li>  
  12. </ul>  
  13. </body>  
  14. </html>  
Definition list<dl>
 
There are three list tags given below:
 
<dl></dl> - Definition list
<dt></dt> - Definition Term
<dd> <dd/>- Data Definition (Description)
  1. <html>  
  2. <body>  
  3. <p> Definition list </p>  
  4. <dl>  
  5. <dt>Apple</dt>  
  6. <dd> is a Healthy Fruit</dd>  
  7. <dt>HTML</dt>  
  8. <dd> is a Markup Languages</dd>  
  9. <dt>Javascript</dt>  
  10. <dd> is a Scripting languages</dd>  
  11. <dt>Vijay</dt>  
  12. <dd> is a good boy</dd>  
  13. </dl>  
  14. </body>  
  15. </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.