HTML <output> tag

Definitie en gebruik

<output> De tag wordt gebruikt om het resultaat van een berekening aan te geven (bijvoorbeeld een berekening die door een script wordt uitgevoerd).

Zie ook:

HTML DOM referentiehandleiding:Output object

Voorbeeld

Voer de berekening uit en <output> Weergeven van het resultaat in het element:

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

Probeer het zelf

Attribute

Attribute Value Description
for Element id Specifies the relationship between the calculated result and the elements used in the calculation.
form Form id Specifies the form to which the output element belongs.
name Name Specifies the name of the output element.

Global properties

<output> The tag also supports Global properties in HTML.

event properties

<output> The tag also supports Event properties in HTML.

Default CSS settings

Most browsers will use the following default values to display <output> Element:

output {
  display: inline;
}

Browser support

The numbers in the table indicate the first browser version to fully support this tag.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
10.0 13.0 4.0 5.1 11.0