VOOZH about

URL: https://www.geeksforgeeks.org/php/html-li-value-attribute/

⇱ HTML | <li> value Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML | <li> value Attribute

Last Updated : 22 Jul, 2022

The <li> value attribute in HTML is used to specify the initial value of the list item. It is only applicable on the ordered list. 

Syntax:

<li value="number">list items </li>

Attribute Value: This attribute contains single value number which is used to specify the value of the list items. 

Example 1: This example uses <li> value attribute to create list of items. 

Output:

 👁 listvalue
 

Example 2: This example uses <li> value attribute to create list of items. 

Output:

 👁 listvalue

Supported Browsers: The browser supported by <li> value attribute are listed below:

  • Apple Safari 4
  • Google Chrome 1
  • Edge 12
  • Firefox 1
  • Opera 12.1
  • Internet Explorer 6
Comment
Article Tags: