HTML <output> Tag
Description
The <output> HTML tag is used to represent the result of a calculation or the outcome of a user action within a web page. It is typically associated with form elements and is designed to display dynamically generated values, such as calculations, conversions, or live feedback based on user input.
The <output> element provides semantic meaning, helping both browsers and assistive technologies understand that the displayed content is a computed result rather than static text. This makes it especially useful for accessibility, as screen readers can identify the output as a result of user interaction.
Common use cases for the <output> tag include displaying:
- The result of a mathematical calculation
- Values updated through JavaScript
- Feedback from form input changes
- Live data such as totals, averages, or measurements
Although <output> is often used inside a <form> element, it can also be used independently anywhere in the document where calculated or dynamic content needs to be shown.
The content inside an <output> element can be updated dynamically using JavaScript, allowing real-time updates without refreshing the page. This makes it ideal for interactive interfaces, calculators, and responsive UI components.
From a semantic perspective, using <output> improves code readability and structure by clearly identifying content that represents a result rather than descriptive or instructional text. This helps maintain clean, meaningful HTML and improves accessibility for users relying on assistive technologies.
Properties
- Permitted Parents
- Any element that accepts phrasing content
- Content
- Inline and text
- Start/End Tags
- Start tag: required, End tag: required
Example
Attributes
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
The following information will show you the current browser support for the HTML <output> tag. Hover over a browser icon to see the version that first introduced support for this HTML tag.
This tag is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 26th December 2025
