<output>...</output>

HTML4 HTML5

Used to represent calculation results, processed data, or script execution output (e.g., JavaScript) in the context of a web form[cite: 3].

Both opening and closing tags are mandatory[cite: 3].

Attributes:

Example

Code:

<form oninput="result.value=parseInt(a.value)+parseInt(b.value)"> <input type="number" id="a" value="10"> + <input type="number" id="b" value="20"> = <output name="result" for="a b">30</output> </form>

The browser will interpret this code as follows:

+ = 30

HTML4 HTML5