HTML <li> value Attribute

❮ HTML <li> tag

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

Syntax

<li value="number">

Attribute Values

Value Description
number Specifies the value of the list item

❮ HTML <li> tag
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.