English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The value attribute sets the value of the list item. The following list items will increment from this number, and this value must be a number and can only be used in ordered lists (<ol>).
Using the value attribute in ordered lists:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML <li> value Attribute Usage-Basic Tutorial(oldtoolbag.com)</title> </head> <body> <ol> <li value="200">Coffee</li> <li>Tea</li> <li>Milk</li> <li>Water</li> <li>Juice</li> <li>Beer</li> </ol> </body> </html>Test See ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the value attribute.
The value attribute sets the value of the list item. The following list items will increment from this number.
This value must be a number and can only be used in ordered lists (<ol>).
In HTML 5 There is no deprecated usage of the value attribute of the <li> element.
<li value="number">
Value | Description |
---|---|
number | Specifies the value of the list item. |