HTML: The Markup Language

lilist item # T

The li element represents a list item.

Permitted contents #

Permitted attributes #

global attributes
Any attributes permitted globally.
value = integer CHANGED #
The ordinal value of the list item. Permitted only if the li element is a child of an ol element.
The value attribute on the li element was deprecated in a previous version of HTML, but is no longer deprecated, as it has meaning and is not simply presentational.

Additional constraints and admonitions #

Tag omission #

An li element must have a start tag.

An li element’s end tag may be omitted if the li element is immediately followed by another li element or if there is no more content in the parent element.

Permitted parent elements #

ul, ol, menu

DOM interface #

interface HTMLLIElement : HTMLElement {
           attribute long value;

Typical default display properties #

li {
display: list-item;
text-align: -webkit-match-parent; }