HTML Lists

HTML Lists

Published by: Anil K. Panta

HTML Lists

HTML supports ordered, unordered and definition lists. Ordered lists items are marked with numbers, letters etc. 

We use <ol> tag for ordered list and each list item starts with <li>  tag. For example, 



Output: 

  1. Apples

  2. Bananas

  3. Lemons

  4. Oranges


If we do not use type attribute, items are marked with numbers. We use type = “a” for lowercase letters list, type = “I” for roman numbers list, and type = “i” for lowercase numbers list.

Unordered lists items are marked with bullets. We use <ul> tag for unordered list and each list item starts with <li>  tag. For example, 



Output:

  • Apples

  • Bananas

  • Lemons

  • Oranges


If we do not use type attribute, items are marked with discs. We use type = “circle” for circle bullets list, and type = “square” for square bullets list

Definition list is the list of items with a description of each item. We use <dl> tag for definition list, <dt> for definition term, and <dd> for definition description. For example, 



Output:

Coffee

..........Black hot drink

Milk

..........White cold drink

We will get back to you via email or phone call