HTML <output> (Form Output) Tag

❮ Previous Reference Next ❯


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


The <output> element defines a region that will be used to display output from some calculation or form control.

Version: HTML5

Standard Syntax


Browser Support



Attribute Value Description
for elementId Specifies the relationship between the result of the calculation and the elements contributed input values to this calculation.
form formId Specifies the form element that this element is associated with.
name name Specifies name of the element.

Global Attributes

<output> element also supports the Global Attributes in HTML.

Event Attributes

<output> element also supports the Event Attributes in HTML.

By Default CSS Value(s)

Most of the browsers will display the <output> element with the following by default value(s)

output {
  display: inline;

Related Tags:

<button>, <datalist>, <fieldset>, <form>, <input>, <label>, <legend>, <meter>, <optgroup>, <option>, <progress>, <select> and <textarea>
❮ Previous Reference Next ❯