value (HTML attribute)

Spec
Depr. Version
Yes HTML 2
Browser support (more…)
IE5.5+ FF1+ SA1.3+ OP9.2+ CH2+
Full Full Full Full Full

Syntax

value="number"

Description

When the value attribute is applied to an li, it sets that list item’s number. The li elements that follow the one to which value is applied increment from that number. Although this attribute takes a numeric value, the value that’s actually displayed may be non-numeric (for more on this, see start). The browser interpretation of the example code is shown in Figure 1.

Figure 1. Changing list item numbering using the value attribute One list item glyph style changed using the type attribute

Example

The example below shows an ordered list item whose value is set to "99":

<ol>
  <li>Eggs</li>
  <li>Cheese</li>
  <li>Milk</li>
  <li value="99">Papadums</li>
  <li>Tickle-me Elmo</li>
  <li>Dr Who Remote Control Dalek</li>
</ol>

Value

This attribute takes a number as its value.

Compatibility

Internet Explorer Firefox Safari Opera Chrome
5.5 6.0 7.0 8.0 1.0 1.5 2.0 3.0 3.5 1.3 2.0 3.1 4.0 9.2 9.5 10.0 2.0
Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full

Good support is provided for the value attribute, but given that it’s a deprecated attribute, you should simply avoid using it.

User-contributed notes

There are no comments yet.

Related Products