FANDOM


The HTML <li></li> element is used to represent a list item. If it is a child of a <menu>, an <ol>, or an <ul>, it is part of these lists and its relation to the other list items is defined by their respective semantics. If it is not the child of those elements, it doesn't convey a list-related relationship with other <li> elements.

Attributes

Attribute Value Description
value number This attribute indicates the current ordinal value of the item in the list as defined by the <ol> element. A positive number is used to specify the value for this attribute. List items that follow will continue numbering from the value set. This attribute has no meaning for unordered lists or for menus.
Global Attributes

See Global HTML Attributes.


HTML example:

<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>

That generates:

  • 1
  • 2
  • 3

External Links