Home | HTML | Asp.Net | HTML Probe | .Net Probe
   
 www.solvingera.com 
  Contact Us |Sitemap
  
   

List in HTML

  
 
Skip Navigation LinksHome>Html Home>HTML List

Three types of listing:

1. Numbered lists : <ol> Tag  is used(ordered list).

2. Bulleted lists : <ul> Tag is used(unordered list).

3. Definition Lists : <li>Tag is used to mark each item in the list.

(1.) Ordered List:

start: Specifies the first number in the list.The default starting number is 1.

type: Specifies the numbering style from the list. You can choose from five predefined numbering styles:

 1 - is used for Decimal numbers.
 a - is used for Lowercase letters.
 A - is used for Uppercase letters.
 i  - is used for Lowercase Roman numerals.
 I - is used for Uppercase Roman numerals.

Example

  <ol start="5" type="1">
   <li>apple</li>
   <li>cat</li>
   <li>Dog</li>
 </ol>

OUTPUT:
  1. apple
  2. cat
  3. Dog

(2.) Unordered List

The unordered list element (<ul>) specifies that you’re creating a bulleted list.
You can use the type attribute with the <ul> element to specify what kind of bullet you want the list to use.

disc: Solid circle bullets (the default).

square: Solid square bullets.

circle: Hollow circle bullets.

Example:

 <ul type="square">
   <li>mango</li>
   <li>orange</li>
   <li>apple</li>
 </ul>

OUTPUT:
  • mango
  • orange
  • apple

(3.) Definition lists

<dl>: Tag is used to holds the list definitions.

<dt>: Tag is used to defines a term in the list.

<dd>:Tag is used to defines a definition for a term.

Example:

 <dl>
   <dt>Solvingera:</dt>
     <dd>A Name On Which Nation Trust.</dd>
   <dt>HTML</dt>
     <dd>Hypertext Markup Language</dd>
     <dd>It is very simple language</dd>
   <dt>Hi !</dt>
     <dd>You are welcome here.</dd>
 </dl>

OUTPUT:
Solvingera:
A Name On Which Nation Trust.
HTML
Hypertext Markup Language
It is very simple language
Hi !
You are welcome here.

Nesting lists

You can create subcategories by nesting lists within other lists.

Example code snippet:

<body>
  <ol>
     <li>HTML
     <ul>
       <li>Tag</li>
       <li>Attribute</li>
       <li>Element</li>
       <li>Style</li>
     </ul>
     </
li>
     <li>Wash car
     <ul>
       <li>Glass</li>
       <li>Wash inside</li>
       <li>Wax exterior </li>
     </ul></li>
     <li>Number
      <ul>
       <li>1</li>
       <li>11</li>
       <li>111</li>
       <li>1111</li>
     </ul></li>
  </ol>
</body>


OUTPUT:
  1. HTML
    • Tag
    • Attribute
    • Element
    • Style
  2. Wash car
    • Glass
    • Wash inside
    • Wax exterior
  3. Number
    • 1
    • 11
    • 111
    • 1111
  
     
    
   
  
DMCA.com Protection Status
Design & Maintain By solvingera group| solvingera.com © 2013-2014 | all right reserved |Privacy Policy | Back to top