HTML <output> Tag
Description
The <output>
HTML element is used for representing the result of a calculation, such as one performed by a script.
Properties
- Permitted Parents
- Any element that accepts phrasing content
- Content
- Inline and text
- Start/End Tags
- Start tag: required, End tag: required
Example
<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>
Attributes
Attribute | Definition |
---|---|
for | Specifies the relationship between the result of the calculation, and the elements used in the calculation |
form | Associates the output with a form |
name | Specifies the name of this element |
Global Attributes
The <output>
tag also supports the Global Attributes in HTML5
Event Attributes
The <output>
tag also supports the Event Attributes in HTML5
Browser Support
Desktop | |||||
X | ≤18 | 10 | 4 | 11 | 7 |
Tablets / Mobile | |||||
![]() |
|||||
Yes | Yes | 4 | X | Yes | Yes |
Last updated by CSSPortal on: 6th December 2019