HTML output Tag

HTML output Tag is used to display the result of user action or the calculation done by the client side script, usually a JavaScript code. HTML output tag is a new HTML5 tag.

Syntax of HTML output Tag

The Syntax of HTML output Tag is shown below, It has both starting tag and ending tag.

<output>
</output>

Usage of HTML output Tag

HTML output Tag is used to output the result of calculations of JavaScript code. HTML output Tag can also be used to output the result of user action. These user actions are usually related to calculations.

for attribute is used in output tag to define it's relationship with the HTML elements used in calculations.

Example of HTML output Tag

Simple example of HTML output Tag is given below.

<form oninput="a.value=parseInt(x.value)-parseInt(y.value)">
  <input type="range" id="x" value="60">
  -<input type="number" id="y" value="10">
  =<output name="a" for="x y"></output>
</form>

In above example we have used output tag to display the result of calculation of two input elements.

Output

Output of above code is shown below.

- =

Browser Support for HTML output Tag

HTML output Tag is supported by latest versions of all major browsers which include Chrome (10.0 and above), Opera (11.0 and above), Firefox (4.0 and above), Edge (13.0 and above) and Safari (5.1 and above).

Global Attributes Support in HTML output Tag

The HTML output Tag supports all Global Attributes.

Event Attributes Support in HTML output Tag

The HTML output Tag supports all Event Attributes.

HTML output Tag Video

Watch our video on HTML output Tag.

HTML anchor Tag HTML abbr Tag HTML acronym Tag HTML address Tag HTML applet Tag HTML area Tag HTML article Tag HTML aside Tag HTML audio Tag HTML b Tag HTML base Tag HTML basefont Tag HTML bdi Tag HTML bdo Tag HTML big Tag HTML blockquote Tag HTML body Tag HTML br Tag HTML Button Tag HTML Canvas Tag HTML Caption Tag HTML Center Tag HTML Cite Tag HTML Code Tag HTML Col Tag HTML colgroup Tag HTML comment Tag HTML data Tag HTML datalist Tag HTML dd Tag HTML del Tag HTML details Tag HTML dfn Tag HTML dialog Tag HTML dir Tag HTML div Tag HTML dl Tag HTML Doctype Tag HTML dt Tag HTML em Tag HTML embed Tag HTML fieldset Tag HTML figcaption Tag HTML figure Tag HTML font Tag HTML footer Tag HTML form Tag HTML frame Tag HTML frameset Tag HTML Heading Tags HTML head Tag HTML header Tag HTML hr Tag HTML html Tag HTML i Tag HTML iframe Tag HTML img Tag HTML input Tag HTML ins Tag HTML kbd Tag HTML label Tag HTML legend Tag HTML li Tag HTML link Tag HTML main Tag HTML map Tag HTML mark Tag HTML meta Tag HTML meter Tag HTML nav Tag HTML noframes Tag HTML noscript Tag HTML object Tag HTML ol Tag HTML optgroup Tag HTML option Tag HTML output Tag HTML p Tag HTML param Tag HTML picture Tag HTML pre Tag HTML progress Tag HTML q Tag HTML rp Tag HTML rt Tag HTML ruby Tag HTML s Tag