WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML <li> Tag


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>
Try it yourself »

More "Try it Yourself" examples below.


Definition and Usage

The <li> tag defines a list item.

menu lists (<menu>).


Browser Support

Element
<li> Yes 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:

li {
    display: list-item;
}