Li – List Item - HTML5

jump

HTML: The Markup Language (an HTML language reference)

« legend link »

lilist item # T

The li element represents a list item.

Permitted contents #

flow content

Permitted attributes #

global attributes & value

ⓘ 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 #

  • The type attribute on the li element is obsolete. Use CSS instead.

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; } « legend link »

Tag » What Is Li In Html