li – list item
<li>…</li>
A list item – in ul with a bullet, in ol with a number. It can contain text and blocks: paragraphs, images or a nested list.
- Default display:
display: list-item - End tag: can be omitted – the item is ended by another
lior by the end of the list - Content: flow content
- Where it can be used:
ul,olormenu - DOM interface:
HTMLLIElement
Attributes
- value – in
olthe number of this item; the following items continue from it. - The obsolete
typeis replaced by CSSlist-style-type.
Examples
An item number set with value – the next item continues with 11:
<ol> <li>Introduction</li> <li value="10">Recipes</li> <li>Index</li> </ol>
Things to watch out for
lioutside a list is not valid HTML. Do not use it for its look – CSS can make a separate line with a bullet.- The bullet or number is the
::markerpseudo-element.list-style: noneon the list removes the bullets. - The browser adds omitted end tags, but in code with nested lists it is easy to get lost in them.
Browser support
Baseline – widely available: works in all major browsers and has for a long time (since 2015 at the latest). Since version: Chrome 1, Firefox 1, Safari 3. As of October 2026 (MDN browser-compat-data).
Related:
ul – bulleted list
ol – numbered list
dl – description list