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 li or by the end of the list
  • Content: flow content
  • Where it can be used: ul, ol or menu
  • DOM interface: HTMLLIElement

Attributes

  • value – in ol the number of this item; the following items continue from it.
  • The obsolete type is replaced by CSS list-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>
result
  1. Introduction
  2. Recipes
  3. Index

Things to watch out for

  • li outside 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 ::marker pseudo-element. list-style: none on 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