HTML | DOM Output htmlFor Property Last Updated : 01 Jun, 2022 Comments Improve Suggest changes Like Article Like Report The HTML DOM Output htmlFor Property is used for returning the value of the for attribute of an <Output> Element. The htmlFor Attribute is used to specify the relationship between the result and the calculation. Syntax: outputObject.htmlFor Parameter: This property does not accepts any parameter. Return Value: It returns a element_id Which represents the relationship between the result and the calculation. Example: This Example returns a htmlFor Property. html <!DOCTYPE html> <html> <head> <title> HTML DOM Output htmlFor Property </title> <style> body { text-align: center; } h1 { color: green; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2> HTML DOM Output htmlFor Property </h2> <form oninput="sumresult.value = parseInt(A.value) + parseInt(B.value) + parseInt(C.value)"> <input type="number" name="A" value="50" /> + <input type="range" name="B" value="0" /> + <input type="number" name="C" value="50" /> <br /> Submit Result: <output name="sumresult" id="geeks" for="A B C"> </output> <br> <br> </form> <Button onclick="myGeeks()">Submit</Button> <h2 id="sudo"></h2> <script> function myGeeks() { var x = document.getElementById("geeks").htmlFor; document.getElementById("sudo").innerHTML = x; } </script> </body> </html> Output: Before Clicking On Button: After Clicking On Button: Supported Browsers: The browsers supported by HTML DOM Output htmlFor Property are listed below: Google Chrome 10.0Firefox 4.0Opera 11.0Safari 5.1 Comment More infoAdvertise with us Next Article HTML | DOM Output htmlFor Property M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML DOM Output name Property The Output name Property in HTML DOM is used to set or return the value of the name Attribute of an <output> element. The name Attribute is used to reference the form-data after submitting the form or to reference the element in JavaScript. Syntax: It returns the name property.outputObject.nam 2 min read HTML | DOM Output form Property The Output form Property in HTML DOM is used for returning a reference to the form where an <Output> Element belongs to. It is read-only Property that returns a form object on success. Syntax: outputObject.form Note: There is no property values in HTML DOM Output form Property. Return value: A 1 min read HTML DOM Label htmlFor Property The DOM Label htmlFor Property is used to set or return the value of the for attribute of a <label> element. The For attribute defines which form element will be labeled. Syntax: It is used to return the htmlFor property:labelObject.htmlForIt is used to set the htmlFor property:labelObject.htm 2 min read HTML DOM Output type Property The HTML DOM Output type Property is used for returning the type of Output Element, the type of element the Output object represents. This property will always return the "output". Syntax: outputObject.type Parameter: This property does not accept any parameter. Return value: It returns a string val 1 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 Like