html lists (ordered , unordered, description)

html defines three different types of lists:ordered list(numbered list) , unordered list(bullet), definition list.

html ordered list:-

ordered list hava elements that are preceded by number or letters. ordered list hold by this tag element<ol>------ending tag</ol>

enclose <li> tag with ol list element.

ol is a block element.

html ol list example

 <body>
    
       <ol> <li> <p> this is the paragraph </p> </li>
       
                  <li> <h1> this is the heading</h1></li>
               
       </ol> </body>

look the above programe output:-

  1. this is the paragraph

  2. this is the heading


html unorderd list:

unordered list have elements that are preceded by bullets style.

unordered list start with the <ul> --- end with </ul< tag. enclose <li> tag with ul list element. ul is a block element.

html ul list example

                   <ul>
                   
             <li><img src="/project/images/list.jpg" width="30px" height="30px;"/> 
             
             </li> <li> <p> this is para</p></li>
             
               </ul>

see ul list result:--

  • this is paragraph


html definition list:-

the <dl> tag defines a definition list. definition list hava two elements for each item <dt> ,<dd>.

definition list example:-

                     
                     <dl>
                     
                          <dt>book</dt>
                          
                      <dd>  definition put here about  dt item</dd> 
                      
                  <dt>web</dt>
                  
                       <dd> definition put here about  dt  item</dd>
                       
                       </dl>

html list (li) element:

the <li> defines a definition list. enclose your li item with eighter <ol> or <ul>. list can be nested .

                          <ol>
                          
                            <li>this is a item</li>
                            
                              <li>  <ul>
                              
                                                <li>this is uordered lite item</li>
                                                
                          <li> second item</li>
                          
                    </ul>
                 
            </ol>