HTML | <output> form Attribute
The HTML <output> form Attribute is used to specify that the <output> element can contain one or more forms.
Syntax:
<output form="form_id">
Attribute Values: It contains single value form_id which contains the value i.e form_id which specify the one or more than the output element belongs to. The value of this attribute should be id of the <form> element.
Example:
<!DOCTYPE html> <html> <head> <title> HTML output Form Attribute </title> <style> body { text-align:center; } h1 { color:green; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2><output>Form Attribute</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 = "30" /><br> Result: <output form ="myGeeks" name = "sumresult"> </output> </form> </body> </html> |
Output:

Supported Browsers: The browser supported by HTML output form attribute are listed below:
- Google Chrome
- Firefox
- Opera
- Safari
Recommended Posts:
- HTML | <form> name Attribute
- HTML | form Attribute
- HTML | <select> form Attribute
- HTML | <textarea> form Attribute
- HTML | <fieldset> form Attribute
- HTML | <label> form Attribute
- HTML | <button> form Attribute
- HTML | <form> method Attribute
- HTML | <form> novalidate Attribute
- HTML | <meter> form Attribute
- HTML | <form> onreset Attribute
- HTML | <form> enctype Attribute
- HTML | <form> autocomplete Attribute
- HTML | <object> form Attribute
- HTML | <form> target Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



