HTML List


There are two type of HTML lists available
  1. Ordered List 
  2. Unordered List
Ex:
Ordered ListUnordered List
  1. List 1
  2. List 2
  3. List 3
    1. Sub List 1
    2. Sub List 2
  • List 1
  • List 2
  • List 3
    • Sub List 1
    • Sub List 2

  1. HTML Ordered List
    An Ordered List of HTML starts with <ol> tag and ends with </ol> tag. Each line of the list starts with <li> and ends with </li> tags.
    Ex: Simple Ordered List
    <ol>
       <li>List 1</li>
       <li>List 2</li>
    </ol>

    Ordered List with sub levels
    <ol>
       <li>List 1</li>
       <li>List 2</li>
       <ol>
          <li>Sub List 1</li>
          <li>Sub List 2</li>
          </ol>
    </ol>

  2. HTML Unordered List
    An Unordered List of HTML starts with <ul> tag and ends with </ul> tag. Each line of the list starts with <li> and ends with </li> tags.
    Ex: Simple Unordered List
    <ul>
       <li>List 1</li>
       <li>List 2</li>
    </ul>

    Unordered List with sub levels
    <ul>
       <li>List 1</li>
       <li>List 2</li>
       <ul>
          <li>Sub List 1</li>
          <li>Sub List 2</li>
          </ul>
    </ul>

  3. HTML Definition List
    HTML definition List is a descriptive list, it includes the description of the each list item. A Definition List starts with <dl> tag and ends with </dl> tag. Description of the list notifies with <dd>tag. Description of the list item is conjuct with the List item by <dt> tag
    Ex:
    <dl>
       <dt>New Cars</dt>
          <dd> - These are brand New Full option Cars imported from Japan. </dd>

       <dt>Old Cars</dt>
          <dd> - These are Recondition & used Cars. </dd>
    </dl>

    Out put
    New Cars
                    - These are brand New Full option Cars imported from Japan.
    Old Cars
                    - These are Recondition & used Cars.


No comments:

Post a Comment