Syntax
<ul>
<li>List item content</li>
</ul>Examples
Basic List Items
Simple items within an unordered list.
<ul>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ul>List Item with Rich Content
A list item can contain more than plain text.
<ul>
<li>
<strong>HTML</strong> — the structure of the web
</li>
<li>
<strong>CSS</strong> — the styling of the web
</li>
</ul>Overriding a Specific Item Number
Using the value attribute inside an ordered list.
<ol>
<li>Step one</li>
<li value="5">Jump to step five</li>
<li>Step six</li>
</ol>Attributes
- value (number): Overrides the item's number when inside an <ol> (has no effect inside <ul>)
Best practices
- Only use <li> as a direct child of <ul>, <ol>, or <menu>
- A list item can contain block-level content like paragraphs or nested lists, not just plain text
- Use the value attribute sparingly, only when you genuinely need to break the natural numbering sequence
- Avoid using li outside of a list container just to get default spacing or bullet styling
At a glance
- Purpose
- Structure and meaning for web content
- File extension
- .html · .htm
- Runs in
- Web browsers
- Usually used with
- CSS and JavaScript
Specifications & further reading
Related HTML documentation
<ul>
The <ul> element represents an unordered list of items, typically displayed with bullet points. The order of items has no semantic meaning — use <ol> instead when sequence matters. Every item inside a <ul> must be wrapped in an <li> (list item) element. Unordered lists are commonly used for navigation menus, feature lists, and any collection of related items.<ol>
The <ol> element represents an ordered (numbered) list, where the sequence of items is meaningful. Like <ul>, every item must be wrapped in an <li> element. Browsers automatically number items starting from 1, but this can be customized using the start and reversed attributes, or a different numbering style with the type attribute. Ordered lists are ideal for step-by-step instructions, rankings, and recipes.<dl>, <dt>, <dd>
The description list group represents a list of term/description pairs — like a glossary or metadata list. <dl> wraps the whole list, <dt> defines each term, and <dd> defines its associated description. Unlike <ul>/<ol>, description lists are not bulleted or numbered by default.<menu>
The <menu> element is a semantic alternative to <ul>, intended specifically for lists of commands or interactive items — like a toolbar or context menu — rather than plain content lists. Browsers currently render it identically to <ul>, but it signals different intent to assistive technology and future tooling.
The <ul> element represents an unordered list of items, typically displayed with bullet points. The order of items has no semantic meaning — use <ol> instead when sequence matters. Every item inside a <ul> must be wrapped in an <li> (list item) element. Unordered lists are commonly used for navigation menus, feature lists, and any collection of related items.<ol>
The <ol> element represents an ordered (numbered) list, where the sequence of items is meaningful. Like <ul>, every item must be wrapped in an <li> element. Browsers automatically number items starting from 1, but this can be customized using the start and reversed attributes, or a different numbering style with the type attribute. Ordered lists are ideal for step-by-step instructions, rankings, and recipes.<dl>, <dt>, <dd>
The description list group represents a list of term/description pairs — like a glossary or metadata list. <dl> wraps the whole list, <dt> defines each term, and <dd> defines its associated description. Unlike <ul>/<ol>, description lists are not bulleted or numbered by default.<menu>
The <menu> element is a semantic alternative to <ul>, intended specifically for lists of commands or interactive items — like a toolbar or context menu — rather than plain content lists. Browsers currently render it identically to <ul>, but it signals different intent to assistive technology and future tooling.