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

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.