HTML Lists

You are Here:

HTML Lists

HTML provides web developers three ways for specifying lists of information. All lists must contain one or more list elements.

The three types in HTML lists are

  • <ul> - unordered list. Used to list items using plain bullets.
  • <ol> - ordered list. Used to list items using numbers (starting from 1).
  • <dl> - descriptions list. Displays list items in the same way as they are arranged in a dictionary.

HTML Ordered Lists

The <ol> tag defines an ordered list of items.

Note: The <li> tag defines a list item.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <ol> <li>Apple</li> <li>Banana</li> </ol> </body> </html>

HTML UnOrdered Lists

The <ul> tag defines an unordered list of items.

Note: The <li> tag defines a list item.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <ul> <li>Apple</li> <li>Banana</li> </ul> </body> </html>

HTML Description Lists

The Description Lists displays list items in the same way as they are arranged in a dictionary.

The 3 HTML description list tags are given below:

  1. <dl> - Specifies a description list.
  2. <dt> - Specifies a term in a description list.
  3. <dd> - Describes about the preceding term (<dt>) in the description list (<dl>).

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <dl> <dt>Apple</dt> <dd>Apple Prevents Cancer</dd> <dt>Banana</dt> <dd>Banana Cure Ulcers and Heart Burn</dd> </dl> </body> </html>

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author