Easy Tutorial
❮ Prop Checkbox Disabled Prop Date Disabled ❯

Li value Attribute

Li Object

Example

Set the list item to increment starting from the number "200":


Definition and Usage

The value attribute sets or returns the value of the value attribute of a list item.

The value attribute sets the value of a list item, and subsequent list items will increment from this number.

Note: The value must be a number and can only be used in an ordered list (<ol>).


Browser Support

All major browsers support the value attribute.


Syntax

Return the value attribute:

Set the value attribute:

Attribute Values

Value Description
number Specifies the value of the list item.

Technical Details

| Return Value: | A number, representing the value of the list item. | | --- | --- |


More Examples

Example

Return the value of a list item:

x Output result:


Related Articles

HTML Reference: HTML <li> value Attribute


Li Object

❮ Prop Checkbox Disabled Prop Date Disabled ❯