HTML Lists | Learn HTML

HTML Lists

HTML lists are used to represent list of information in well formed and semantic way. There are three types of list in HTML and each one has a specific purpose and meaning:

  • Ordered List or Numbered List (ol) : Used to group a set of related items, in a specific order.
  • Unordered List or Bulleted List (ul) : Used to group a set of related items, in no particular order.
  • Description List or Definition List (dl) : Used to display a list of terms and their descriptions.
Html Lists | Tech-Mirror
Html Lists | Tech-Mirror

HTML Ordered List or Numbered List

In the ordered HTML lists, all the list items are marked with numbers. It is known as numbered list also. The ordered list starts with <ol> tag and the list items start with <li> tag. like 1,2,3…. or I,II,III…

Output:

  1. Apple
  2. Mango
  3. Orange
  4. Banana

HTML Unordered List or Bulleted List

HTML Unordered list, all the list items in this list are marked with bullets. It is also known as bulleted list also. The Unordered list starts with <ul> tag and list items start with the <li> tag.

Output:

  • Apple
  • Mango
  • Orange
  • Banana

HTML Description List or Definition List

HTML Description list is also a list style which is supported by HTML and XHTML. It is also known as definition list where entries are listed like a dictionary or encyclopedia.

The definition list is very appropriate when you want to present glossary, list of terms or other name-value list.

The HTML definition list contains following three tags:

  1. <dl> –  defines the start of the list.
  2. <dt> –  defines a term.
  3. <dd> – defines the term definition (description).

Output :

Apple

-I Like It.

Mango

-King of Fruits.

Orange

-It is Awesome.


For More >> HTML Tables

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *