<li> elementThe <li> element represents a list item. It is the element used for each item inside an <ol>, <ul>, or <menu> list.
The parent list gives the kind of list. Inside an unordered list, the <li> element is one unordered item. Inside an ordered list, it is one step or entry in the sequence.
A list item can contain simple text, but it can also contain richer content such as paragraphs, links, images, nested lists, or other flow content. A nested list belongs inside the item it expands, before the closing </li> tag.
In an ordered list, the value attribute sets an item's number using an integer. Following items continue from that number unless another value changes it. In the example below, the numbers are 1, 5, and 6. In a reversed ordered list, numbering continues downwards instead. The attribute must not be used on items in <ul> or <menu>.
In HTML, the closing </li> tag can be omitted when another <li> immediately follows, or when there is no more content in the parent element. Writing it explicitly makes item boundaries clearer, especially with nested lists.
Attributes: value, GLOBALS.
Typical layout: <ol> <li>First step</li> <li value="5">Fifth step</li> <li>Sixth step</li> </ol>
Visual representation:
The second item changes the numbering.