HTML <li> Tag
Description
The HTML <li> element represents a list item. It must be contained within a parent list element — either <ul> (unordered list), <ol> (ordered list), or <menu>.
In ordered lists, list items are usually displayed with a number or letter. In unordered lists they are typically displayed with a bullet point.
CSS Display:
list-itemSyntax
<li>List item content</li>Popular Attributes
| Attribute | Description |
|---|---|
| value | The initial or current value of the element. |
| id | A unique identifier for the element. Used for CSS styling, JavaScript targeting, and anchor links. |
| class | Specifies one or more CSS class names for styling the element. |
This element also supports global HTML attributes such as class, id, style, data-*, and more.
Examples
List Items in Unordered List
<ul>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ul>
List items displayed with bullet points.
List Items in Ordered List
<ol>
<li>Step one</li>
<li>Step two</li>
<li>Step three</li>
</ol>
List items displayed with numbers.
Notes
The <li> element can contain any flow content, including other lists, paragraphs, and block elements. When using the value attribute in an <ol>, subsequent items will continue numbering from that value.
Related Tags
Last updated: 7th April 2026