HTML <li>Label
Example
HTML two list examples: an ordered list (<ol>) and an unordered list (<ul>):
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
Try it »
(See more examples at the bottom of this page)
Browser support
![]()
Currently, most mainstream browsers support the <li> tag.
Tag definition and usage instructions
<li> tag defines a list item.
<li> tag can be used in ordered lists (<ol>), unordered list (<ul>) and the menu list (<menu>In ).
Differences between HTML 4.01 and HTML5
The "type" attribute has been deprecated in HTML 4.01. HTML5 does not support this attribute.
The "value" attribute has been deprecated in HTML 4.01. HTML5 does not support this attribute.
Hints and Notes
Hint:Please use CSS to define the types of lists and list items.
Attribute
| Attribute | Value | Description |
|---|---|---|
| type | 1 A a I i disc square circle |
HTML5 does not support this attribute. HTML 4.01 has deprecated this attribute.Deprecated. Use styles instead. Specifies which type of bullet to use. |
| value | number | Deprecated. Please use styles instead. Specifies the number of list items. |
global attributes
<li> tag supports global attributes, see the full attribute list.HTML global attributes。
Event attributes
<li> tag supports allHTML event attributes。
Online example
A nested list.
A list within a list.
Another nested list.
More complex nested lists.
Related articles
HTML Tutorial:HTML list
Other extensions.