HTML <output> tag


Performs a calculation and displays the result in the <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>

Try it yourself

Browser Support

IE Firefox Chrome Safari Opera

Firefox, Chrome, Safari and Opera support the <output> tag.

Note: 8 and earlier versions of Internet Explorer do not support the <output> tag.

Definition and Usage

<Output> tag defines the different types of output, such as the output of the script.

HTML 4.01 and HTML 5 differences between

<Output> tag is new in HTML 5 tag.


new: HTML5 new property.

Attributes value description
for element_id Defined output fields related to one or more elements.
form form_id A definition of the input field belongs to one or more forms.
name name Define a unique name for the object. (When using a form submission)

Global Properties

<output> tag supports HTML in the global properties .

Event Properties

<output> tag supports HTML in the event properties .