<li> - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:li

Introduction

The li element marks an item in a list.

You can use it with the ul, ol, and menu elements.

The li Element summary

Item Value
Element li
Element TypeN/A
Permitted Parentsul, ol, menu
Local Attributesvalue (only permitted when child of ol element)
ContentsFlow content
Tag Style Start and end tag
New in HTML5No
Changes in HTML5 The value attribute deprecated in HTML4 has been restored in HTML5

Style Convention

li {
   display: list-item;
}

Using the li Element

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
   <head> 
      <title>Example</title> 
   </head> 
   <body>
       I like: <!--from  w  w w .  j  a va 2  s . co  m-->
      <ul> 
         <li>CSS</li> 
         <li>HTML</li> 
         <li>Code</li> 
         <li>Java</li> 
         <li>SQL</li> 
         <li>C</li> 
      </ul>  
   </body>
</html>

Related Tutorials