Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML li value Attribute

HTML
  • value attribute
  • HTML li Tag Reference HTML

  • tag

    Example

    Using the value attribute in an ordered list:

       

    1. Coffee
    2.  

    3. Tea
    4.  

    5. Milk
    6.  

    7. Water
    8.  

    9. Juice
    10.  

    11. Beer

    Try it »


    Browser support

    Internet ExplorerFirefoxOperaGoogle ChromeSafari

    All major browsers support the value attribute.


    Definition and Usage

    The value attribute sets the value of a list item. The following list items will continue in ascending order from that number.

    The value must be a number and can only be used in an ordered list (

      ).


      Differences between HTML 4.01 and HTML5

      In HTML5, it is not deprecated to use the

    1. element's value attribute.


      Syntax

    2. HTML
    3. tag