Latest web development tutorials

HTML li value property

HTML li tag Reference Manual HTML <li> tag

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>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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 Reference Manual HTML <li> tag