Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <li> value Attribute

The value attribute on a <li> tag sets the numeric or alphabetic starting value of the items in an ordered list.

The value can be numeric, alphabetic, roman numerals, etc.

Example

#

A value attribute on a <li> element.
This attribute sets the starting value for the remainder of the list.

  1. Paper
  2. Pencils
  3. Scissors
  4. Erasers
<ol>
  <li>Paper</li>
  <li value="55">Pencils</li>
  <li>Scissors</li>
  <li>Erasers</li>
</ol>

Using value

The value attribute sets the list item starting number, which then continues in subsequent items.

The value can be numeric, alphanumeric, or roman numeral, depending on the numbering system used.

The value attribute only applies to ordered lists (<ol>) -- not to unordered lists (<ul>).


Syntax

<li value="number">

Values

#

Value Description
number A string representing numeric, alphabetic, or a roman numeral value.

Browser support

Here is when value support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

 Back to <li>

Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides