<output> tag

HTML5 <output> tag

The HTML5 <output> tag shows the result of a calculation.

Syntax:
<output>text….</output>

Example

<form oninput ="totalresult.value = parseInt(M1.value)+parseInt(M2.value)">
<input type ="range" name ="M1" value ="0" /> +
<input type ="number" name ="M2" value ="1000" /> 
<br><br>
Total = <output name ="totalresult"></output>
</form>

How Browser will display

INLINE.

Difference between HTML4.01, XHTML and HTML5

HTML4 XHTML HTML5
NA NA New tag in HTML5

Attributes used with <output> tag

Attribute Description
for It sets a relation between the element and the result of the calculation using an element_id.
form Defines all the forms which is related to the output element. Internet Explorer/Edge browsers does not support this.
name Defines the name of the output element.

Global Attributes

The <output>  tag supports global attributes.

Event Attributes

The <output>  tag supports event attributes.

Supporting Browsers

supporting-browsers for tags

Related Tags

 <form>, <input>

Tutorials for all brains!