li value Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:li

Description

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

The value must be a number and can only be used in ordered lists (<ol>).

Attribute Values

Value Description
number Specifies the value of the list item

The following code shows how to Use of the value attribute in an ordered list:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<ol>
  <li value="100">Coffee</li>
  <li>A</li>
  <li>B</li>
  <li>C</li>
  <li>D</li>
  <li>E</li>
</ol><!-- w w  w  .  jav  a 2 s  . co m-->

</body>
</html>

Related Tutorials