1 out of 1 rated this helpful - Rate this topic

value attribute | value property

[This documentation is preliminary and is subject to change.]

Sets or retrieves the value of a list item.

Syntax

HTML<element value="p" ... >
JavaScript

p = object.value

Property values

Type: Integer

the value of the item.

Standards information

Remarks

In an ordered list, the value is the number that precedes the list item. Changing the value will change the visual numbering of all following list items. In an unordered list, the value is initially zero. Changing the value has no visual effect on the item.

Examples

This example sets each line item's value to an integer string.


<OL>
<LI VALUE="1">One
<LI VALUE="2">Two
<LI VALUE="3">Three
</OL>

 

 

Build date: 3/8/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Big numbers hide under page margin
If the number is longer than the indentation provided for the list item, the leading digits are invisible (cropped). This is a purely visual phenomenon; clipboard data preserve the declared value.