<

HTML <output> Tag

The <output> tag represents the result of a calculation (like one performed by a script).

Attributes



Attribute Value Description
for element_id Specifies the relationship between the result of the calculation, and the elements used in the calculation
form form_id Specifies one or more forms the output element belongs to
name name Specifies a name for the output element


Example




<!DOCTYPE html>
<html>
<body>

<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
<input type="range" id="a" value="30">100
+<input type="number" id="b" value="30">
=<output name="x" for="a b"></output>
</form>

</body>
</html>
















© copyright 2017-2022 Completedone pvt ltd.