Latest

recent

HTML LI value attribute

Example

Use of the value attribute in an ordered HTML list:
<ol>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
  <li value="100">Water</li>
  <li>Juice</li>
  <li>Beer</li>
</ol>


Definition and Usage

The value attribute sets the number of a list item. The following list items will increment from that number.

Browser Support

The value attribute is deprecated, but still supported in all major browsers.

Compatibility Notes

The value attribute of the li element was deprecated in HTML 4.01, and is not supported in XHTML 1.0 Strict DTD.
Note: At the moment, there is no CSS alternative for the value attribute.

Syntax

<li value="number">

Attribute Values

Value Description
number The number of the current list item
HTML LI value attribute Reviewed by 1000sourcecodes on 02:35 Rating: 5
Powered by Blogger.