HTML - <output>
The HTML <output>
element represents the result of a calculation or user action.
Example
HTML
Copy Code
<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">60</output> </form>
Description
The HTML <output>
element represents the result of a calculation or user action.
Content categories | Flow content, phrasing content, listed, labelable, resettable form-associated element, palpable content. |
---|---|
Permitted content | Phrasing content. |
Tag omission | None, both the starting and ending tag are mandatory. |
Permitted parent elements | Any element that accepts phrasing content. |
DOM interface | HTMLOutputElement |
Browser Compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 10 | 4.0 (2.0) | No support | 11 | 7 |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | ? | 4.0 (2.0) | ? | ? | 7 |
See Also
- Other form-related elements:
<form>
,<input>
,<button>
,<datalist>
,<legend>
,<label>
,<select>
,<optgroup>
,<option>
,<textarea>
,<keygen>
,<fieldset>
,<progress>
and<meter>
.
Specifications
Specification | Status | Comment |
---|---|---|
WHATWG HTML Living Standard The definition of '<output>' in that specification. |
Living Standard | |
HTML5 The definition of '<output>' in that specification. |
Recommendation |
License
© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/html/element/output