HTML Lists




HTML lists are used to specify lists of information All lists may contain one or more list elements There are three different types of HTML lists:
  1. Ordered List or Numbered List (ol)
  2. Unordered List or Bulleted List (ul)
  3. Description List or Definition List (dl)
Example - 

<body>
     <ul>
          <li>I am a list item!>
          <li>I am a list item too!>
          <li>I am a list item also!>
     </ul>
</body>

Output - 
  • I am a list item!
  • I am a list item too!
  • I am a list item also!

Numbered List

Example - 

<ol>  
 <li>Aries</li>  
 <li>Bingo</li>  
 <li>Leo</li>  
 <li>Oracle</li>  
</ol>  

Output - 
  1. Aries
  2. Bingo
  3. Leo
  4. Oracle

Unordered List or Bulleted List

Example - 

<ul>  
 <li>Aries</li>  
 <li>Bingo</li>  
 <li>Leo</li>  
 <li>Oracle</li>  
</ul>  

Output - 
  • Aries
  • Bingo
  • Leo
  • Oracle

Description List or Definition List

Example - 

The HTML details list is a list style supported by HTML and XHTML. This definition is also known as the list where entries are listed as a dictionary or encyclopedia.

<dl>  
  <dt>Aries</dt>  
  <dd>-One of the 12 horoscope sign.</dd>  
  <dt>Bingo</dt>  
  <dd>-One of my evening snacks</dd>  
 <dt>Leo</dt>  
 <dd>-It is also an one of the 12 horoscope sign.</dd>  
  <dt>Oracle</dt>  
  <dd>-It is a multinational technology corporation.</dd>   
</dl>  

Output - 


Aries
-One of the 12 horoscope sign.
Bingo
-One of my evening snacks
Leo
-It is also an one of the 12 horoscope sign.
Oracle
-It is a multinational technology corporation.


Share on Google Plus

About It E Research

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment