HTML <li> value Attribute

❮ HTML <li> tag

Example

<ol>
  <li value="3">One</li>
  <li>Two</li>
  <li>Three</li>
</ol>

<ol type="a">
  <li value="3">One</li>
  <li>Two</li>
  <li>Three</li>
</ol>

<ol type="i">
  <li value="3">One</li>
  <li>Two</li>
  <li>Three</li>
</ol>

Meaning

The value attribute specifies the current number of items in an ordered list as defined by an ol element.

Regardless of the value of type being used to set Roman numerals or letters, the only allowed value for this attribute is a number.

List items that follow will continue numbering from the value set. The value attribute has no meaning for unordered lists ul or menus <menu>.

Note: CSS 2 counters can provide much more flexibility than this attribute.

Note: This attribute was deprecated in HTML4, but reintroduced in HTML5.


Standard Syntax

<ol>
  <li value="number"></li>
</ol>



Browser Support




Status







Example

Example

<ol>
  <li>One</li>
  <ol>
    <li>One.1</li>
    <li>Two.2</li>
  </ol>
  <li>Two</li>
</ol>



Attribute Values

Value Description
number Specifies the value(integers only) of the list item.
❮ HTML <li> tag