Menu
The output
tag is used within a <form>
tag to show a calculation’s result (typically one performed by a script).
Example:
<form oninput="a.value=parseInt(x.value)+parseInt(y.value)">
<input type="range" id="x" value="40"> + <input type="number" id="y" value="10">
= <output name="a" for="x y"></output>
</form>
for
Using element_id, this attribute designates the relationship between the elements used in the calculation and the calculation’s result.
form
Provides the id of the form to which the <output>
tag belongs.
name
Provides the name of the output.
Have a code example of <output>
? Submit a codepen.io demo and we'll showcase it here ↴