HTML <li> value Attribute
Example
Use of the value attribute in an ordered list:
<ol>
<li value="100">Coffee</li>
<li>Tea</li>
<li>Milk</li>
<li>Water</li>
<li>Juice</li>
<li>Beer</li>
</ol>
Try it Yourself »
Definition and Usage
The value attribute sets the value of a list item. The following list items will increment from that number.
The value must be a number and can only be used in ordered lists (<ol>).
Browser Support
Attribute | |||||
---|---|---|---|---|---|
value | Yes | Yes | Yes | Yes | Yes |
Differences Between HTML 4.01 and HTML5
NONE.
Syntax
<li value="number">
Attribute Values
Value | Description |
---|---|
number | Specifies the value of the list item |
❮ HTML <li> tag