MDN self-hosted library · e01.org

HTMLLIElement: value property

HTML DOM

no runnable cells web-api-instance-property upstream source

HTML DOM

The value property of the HTMLLIElement interface indicates the ordinal position of the list element inside a given ol. It can be smaller than 0. If the li element is not a child of an ol element, the property has no meaning.

It reflects the value attribute of the corresponding li element. If the <li> element does not have a value content attribute specified, then this property returns 0 by default even when the element may have a default serially-assigned ordinal value when rendered.

Value

An integer.

Specifications

Browser compatibility