English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

Complete List of HTML Tags

HTML li value Attribute

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>).

 HTML <li> tag

Online Example

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 ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the value attribute.

Definition and Usage

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>).

HTML 4.01 with HTML5differences

In HTML 5 There is no deprecated usage of the value attribute of the <li> element.

Syntax

<li value="number">

Attribute Value

ValueDescription
numberSpecifies the value of the list item.
 HTML <li> tag