HTML - <li>Tag


Advertisements


Description

The HTML <li> tag is used for specifying a list item in ordered, unordered, directory, and menu lists.

Example

Live Demo
<!DOCTYPE html>
<html>

   <head>
      <title>HTML li Tag</title>
   </head>

   <body>
      <ul>
         <li>ol - ordered list</li>
         <li>ul - unordered list</li>
         <li>dir - directory list</li>
         <li>menu - menu list</li>
      </ul>
   </body>

</html>

This will produce the following result −

Global Attributes

This tag supports all the global attributes described in − HTML Attribute Reference

Specific Attributes

The HTML <li> tag also supports the following additional attributes −

Attribute Value Description
type A
a
I
i
1
disc
square
circle
Deprecated − Specifies the type of the list.
value number Specifies the value of a list item.

Event Attributes

This tag supports all the event attributes described in − HTML Events Reference

Browser Support

Chrome Firefox IE Opera Safari Android
Yes Yes Yes Yes Yes Yes

html_tags_reference.htm

Advertisements
E-Books Store