HTML List

HTML provides three types of lists

  1. Ordered List
  2. Unordered List
  3. Definition List

Lets see each list one by one with suitable example.

Ordered List


This list are used to show information where order is important. for this we use ol tag.
inside <ol>..</ol> we use <li> tag.

Syntax

We can use type attribute to show list number type.

  1. <ol type=”1″ value=”1″> list start with number 1 and its type is numberic
  2. <ol type=”1″ value=”5″> list start with number 5 and its type is numberic
  3. <ol type=”A”>  list start with capital letter A
  4. <ol type=”A” value=”3″>  list start with capital letter C
  5. <ol type=”a”> list will start with small letter a
  6. <ol type=”I”> list will start with capital roman letter
  7. <ol type=”i”> list will start with small roman letter

Example:

Unordered List


This list are used to show information where order is not important. for this we use ul tag.
inside <ul>..</ul> we use <li> tag.

You can use type attribute for showing different list market type.
like <li type=”disc”>, <li type=”circle”> or <li type=”square”>

Example:

Definition List


To provide terms with definition we use definition list
for using definition list we use <dl>..</dl> tag.
Inside dt tag we use <dt>..</dt> for term to define
For definition(description) of term we use <dd>..</dd>

We can also use nested list means list inside another list of any kind.