0 100 +"> 0 100 +" />
Easy Tutorial
❮ Att Thead Align Att Link Href ❯

HTML <output> Tag

Example

Display the result of a calculation inside an <output> element:

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

Browser Support

The numbers in the table specify the first browser version that fully supports the attribute.

Element Chrome Edge Firefox Safari Opera
<output> 10.0 13.0 4.0 5.1 11.0

Tag Definition and Usage

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


Differences Between HTML 4.01 and HTML5

The <output> tag is new in HTML5.


Attributes

Attribute Value Description
for New element_id Describes the relationship between the elements used in the calculation and the result.
form New form_id Defines one or more forms the input field belongs to.
name New name Defines a unique name for the object (used when submitting the form).

Global Attributes

The <output> tag supports the global attributes, see the full list in HTML Global Attributes.


Event Attributes

The <output> tag supports all HTML Event Attributes.

❮ Att Thead Align Att Link Href ❯