HTML | DOM li value Property Last Updated : 29 Aug, 2022 Comments Improve Suggest changes Like Article Like Report The DOM Li value Property is used to set or return the value of the value attribute of a list item. The value attribute is used to set the value for the list items and the other list item will be increment form that numeric value. The value may be a number and alphabetical. Syntax: Return the value property.liObject.valueIt is used to set the value property.liObject.value = number Property Value: It contains a value i.e number which specify the value of the list item. Return Value: It returns a numeric value which represents the value of the list item. Example-1: This Example returns a value Property. HTML <!DOCTYPE html> <html> <head> <title> DOM li value Property </title> </head> <body> <h1>GeeksforGeeks</h1> <h2> DOM Li value Property </h2> <ol> <!-- Assigning id to 'li tag' --> <li id="GFG" value="100"> Geeks </li> <li>Sudo</li> <li>Gfg</li> <li>Gate</li> <li>Placement</li> </ol> <button onclick="myGeeks()"> Submit </button> <p id="sudo" style="font-size:25px; color:green;"> </p> <script> function myGeeks() { // return li value Property var g = document.getElementById("GFG").value; document.getElementById( "sudo").innerHTML = g; } </script> </body> </html> Output: Before Clicking On Button: After Clicking On Button: Example-2: This Example sets the value Property. HTML <!DOCTYPE html> <html> <head> <title> DOM li value Property </title> </head> <body> <h1>GeeksforGeeks</h1> <h2> DOM Li value Property </h2> <ol> <!-- Assigning id to 'li tag' --> <li id="GFG" value="100"> Geeks </li> <li>Sudo</li> <li>Gfg</li> <li>Gate</li> <li>Placement</li> </ol> <button onclick="myGeeks()"> Submit </button> <p id="sudo" style="font-size:25px; color:green;"> </p> <script> function myGeeks() { // set li value Property var g = document.getElementById( "GFG").value = "200"; document.getElementById( "sudo").innerHTML = "The value was change form 100 to " + g; } </script> </body> </html> Output: Before Clicking On Button: After Clicking On Button: Supported Browsers: Google ChromeMozilla FirefoxEdgeOperaSafari Comment More infoAdvertise with us Next Article HTML | DOM li value Property M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML DOM value Property The DOM value property in HTML is used to set or return the value of any attribute.Syntax: It returns the attribute value. attribute.valueIt is used to set a value to the property. attribute.value = valueProperty Value: value: It defines the value of the attribute.Return Value: It returns a string v 2 min read HTML | DOM Meter value Property The DOM Meter value Property is used to set or return the value of the value attribute in a gauge. The value attribute is used to specify the current value of the gauge. The value should between the min and max attribute values. Syntax: It returns the value property.meterObject.valueIt is used to se 2 min read HTML | DOM Output value Property The HTML DOM Output value Property is used to set or return the value of the Attribute of an <Output> Element. The value Attribute is used to specify the result of the calculation. Syntax: It return the value property.outputObject.value It set the value property.outputObject.value = result Pro 2 min read HTML | DOM Link rel Property The HTML | DOM Link rel Property in HTML DOM is used to set or return the value of the rel attribute of a linked document. The rel attribute is used to specify the relation between the current document and the linked document. Syntax: It returns the rel property.linkObject.relIt is used to set the r 3 min read HTML DOM id Property The DOM id Property is used to set or return the id of an element i.e value of the Id Attribute. An ID should be different in a document. It is returned by using the document.getElementById() method. Syntax HTMLElementObject.id Return values: This syntax is used to return the id Property. HTMLElemen 2 min read Like