HTML li value property
Examples
Using the value property in the ordered list:
<ol>
<li value="100">Coffee</li>
<li>Tea</li>
<li>Milk</li>
<li>Water</li>
<li>Juice</li>
<li>Beer</li>
</ol>
<li value="100">Coffee</li>
<li>Tea</li>
<li>Milk</li>
<li>Water</li>
<li>Juice</li>
<li>Beer</li>
</ol>
try it"
Browser Support
All major browsers support attribute value.
Definition and Usage
value property set the value of the list item. The following list items will begin in ascending order from that number.
The value must be a number, and can only be used in an ordered list (<ol>) in.
Differences between HTML 4.01 and HTML5
In HTML 5, there is no deprecated value attribute <li> element.
grammar
<li value="number">
Property Value
值 | 描述 |
---|---|
number | 规定列表项目的值。 |
HTML <li> tag