HTML <output> form Attribute
Example
An <output> element located outside a form (but still a 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>
Try it Yourself »
Definition and Usage
The form
attribute specifies the form the
<output>
tag belongs to.
The value of the form
attribute must be equal to the
id
attribute of a <form>
element in the same document.
Browser Support
Attribute | |||||
---|---|---|---|---|---|
form | Not supported | Not supported | Not supported | Not supported | Not supported |
Syntax
<output form="form_id">
Attribute Values
Value | Description |
---|---|
form_id | Specifies the form element the <output> element belongs to. The value of this attribute must be the id attribute of a <form> element in the same document. |
❮ HTML <output> tag
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.