Home » HTML » HTML Output Tag

HTML Output

HTML Output Tag

The <output> tag represents the result of a calculation.


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> HTML Output Tag </title>
</head>
<body>
<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
<input type="range" id="a" value="50">100
+<input type="number" id="b" value="50">
=<output name="x" for="a b">
</output>
</form>
</body>
</html>

Output

HTML Output Tag
0 100 + =

HTML Output Attribute

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

Browser Support

Element
Microsoft Edge browser.png Edge
Chrome browser.png Chrome
Firefox browser.png Firefox
Opera browser.png Opera
safari browser.png Safari
<output>
Yes
Yes
Yes
Yes
Yes








Follow Us: