English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Manual de Referência HTML

大全 de etiquetas HTML

HTML: <output> etiqueta

A tag <output> do HTML representa o resultado de uma contagem ou operação do usuário.

Exemplo Online

Exiba o resultado da contagem no elemento <output>:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>Manual Básico(oldtoolbag.com)</title> 
</head>
<body>
<form oninput="result.value=parseInt(a.value)+parseInt(b.value)
    <input type="range" name="b" value="50" /> +
    <input type="number" name="a" value="10" /> =
    <output name="result"></output>
</form>
<p><strong>Atenção:</strong>  Internet Explorer não suporta o marcador <output>。</p>
</body>
</html>
Test and see ‹/›

Browser compatibility

IEFirefoxOperaChromeSafari

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

Note: Internet Explorer browser does not support <output> tag.

Definition and usage description

<output> tag as the display of the calculation result (such as the output of executing a script).

in HTML 4.01 with HTML5difference

<output>  tag is an HTML 5 of the new tag.

Attribute

AttributeValueDescription
forHTML5element_idDescribe the relationship between the elements used in the calculation and the calculation results.
formHTML5form_idDefine one or more forms that the input field belongs to.
nameHTML5nameDefine the unique name of an object (used when submitting a form).

global attributes

<output> tag supports global attributes, see the complete attribute table HTML global attributes.

event attributes

<output> tag supports all HTML event attributes.