HTML <output> Tag

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


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


<!DOCTYPE html>

<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>


© copyright 2017-2022 Completedone pvt ltd.