← Previous


HTML list helps user to organize a group of related data.. All lists must contain one or more list elements. Lists may contain:

  1.  An unordered list. This will list items using plain bullets.
  2. An ordered list. This will use different schemes of numbers to list your items.

HTML Unordered Lists

An unordered list is a collection of related items that have no special order or sequence. This list is created by using HTML tag. Each item in the list is marked with a bullet.

Example

<ul>
   <li>Apple</li>
   <li>Ginger</li>
   <li>Potato</li>
   <li>Mango</li>
</ul>

This will produce following result:

  • Apple
  • Ginger
  • Potato
  • Mango

The type Attribute

You can use type attribute for tag to specify the type of bullet you like. By default it is a disc. Following are the possible options:

<ul type="square"> 
<ul type="disc"> 
<ul type="circle">

HTML Ordered Lists

If you are required to put your items in a numbered list instead of bulleted then HTML ordered list will be used. This list is created by using tag. The numbering starts at one and is incremented by one for each successive ordered list element tagged with.

Example

<ol>
    <li>Apple</li>
    <li>Ginger</li>
    <li>Potato</li>
    <li>Mango</li>
</ol>

This will give following output

  1. Apple
  2. Ginger
  3. Potato
  4. Mango

The type Attribute

You can use  type  attribute for tag to specify the type of numbering you like. By default it is a number. Following are the possible options:

<ol type="1">  - Default-Case Numerals.
<ol type="I"> - Upper-Case Numerals.
<ol type="i"> - Lower-Case Numerals.
<ol type="a"> - Lower-Case Letters.
<ol type="A"> - Upper-Case Letters.

The start Attribute

You can use  start  attribute for tag to specify the starting point of numbering you need. Following are the possible options:

 <ol type="1" start="4"> - Numerals starts with 4.
<ol type="I" start="4"> - Numerals starts with IV.
<ol type="i" start="4"> - Numerals starts with iv.
<ol type="a" start="4"> - Letters starts with d.
<ol type="A" start="4"> - Letters starts with D.
← Previous