HTML <li> Tags

Example

One ordered (<ol>) and one unordered (<ul>) HTML list :

 <ol>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

<ul>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul> 
Execute Code

Definition and Usage

The <li> tag defines a list item.

The <li> tag is used in ordered lists(<ol>), unordered lists (<ul>), and in menu lists (<menu>).


Browser Support

Element Chrome Internet Explorer Firefox Safari Opera
<li> Yes Yes Yes Yes Yes

Differences Between HTML 4.01 and HTML5

The "type" attribute is NOT supported in HTML5.

The "value" attribute was deprecated in HTML 4.01, but IS supported in HTML5.


Tips and Notes

Tip : Use CSS to define the type of list.


Attributes

Attribute Value Description
type 1
A
a
I
i
disc
square
circle
Not supported in HTML5.
Specifies which kind of bullet point will be used
value number Specifies the value of a list item. The following list items will increment from that number (only for <ol> lists)

Default CSS Settings

Most browsers will display the <li> element with the following default values :

Example

li 
{
    display: list-item;
}