HTML <output> form attribute
Definition and Usage
form
attribute specifies the form to which the <output> tag belongs.
form
The value of the attribute must be equal to the <form> the id attribute of the element.
Example
The <output> element located outside the form (but still part of the form):
<form action="/action_page.php" id="numform"}} oninput="x.value=parseInt(a.value)+parseInt(b.value)" <input type="range" id="a" name="a" value="50"> + <input type="number" id="b" name="b" value="25"> <input type="submit"> </form> <output form="numform" id="x" name="x" for="a+b"></output>
Syntax
<output form="form_id">
Attribute Value
Value | Description |
---|---|
form_id |
Specifies the form element to which the <output> element belongs. The value of this attribute must be the id attribute of the <form> element in the same document. |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Not Supported | Not Supported | Not Supported | Not Supported | Not Supported |