← Back to all elements

The <output> Element

The <output> element is used to display the result of a calculation or user action, especially in forms or calculators. It creates a semantic relationship between the inputs and the result, improving accessibility for screen readers.

When to use it

Use the <output> element when you want to display dynamic calculation results in forms or calculators.

It is especially useful for associating the result with specific input fields using the 'for' attribute, which helps assistive technologies understand the relationship.

Live Demo & Code