HTML <output> nameAttribute
Examples
Perform a calculation and display the result in the <output> element:
<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
<input type="range" id="a" value="50">100
+<input type="number" id="b" value="50">
=<output name="x" for="a b"></output>
</form>
<input type="range" id="a" value="50">100
+<input type="number" id="b" value="50">
=<output name="x" for="a b"></output>
</form>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
Firefox, Opera, Chrome, and Safari browsers support the name attribute.
Note:Internet Explorer browser does not support the <output> tag.
Definition and Usage
The name attribute specifies the name of the <output> element.
The name attribute is used to reference form data after a form is submitted, or to reference an element in JavaScript.
Differences Between HTML 4.01 and HTML5
The <output> tag is a new tag in HTML5.
Syntax
<output name="name">
Attribute Values
| Value | Description |
|---|---|
| name | Specifies the name of the <output> element. |
HTML <output> Tag Other Extensions