Publish in HTML Tutorial el 25/05/2025 14:31
The <output> element represents the result of a calculation or user action. It's typically used to display results from form calculations or script outputs. Unlike other form elements, <output> doesn't have a value attribute - its content is set either by JavaScript or through form relationships.
Here's the basic structure of the <output> element:
The <output> element supports these attributes:
A simple output element displaying static text:
Using output with form inputs to create a simple calculator:
Displaying the current value of a range slider using output:
Using JavaScript to calculate and display results in an output element:
Using output to display dynamic content from user input:
The <output> element is supported in all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera. For older browsers, you can use a span or div with similar functionality.
The <style> HTML element contains style information for a document, or part of a document. ...
The <strong> element is used to indicate that its content has strong importance, seriousnes...
The <span> element is an inline container used to mark up a part of a text or document. Unl...
The <source> element is used to specify multiple media resources for media elements like &l...
The <small> element is used to represent side-comments and small print, typically for discl...
HTML <section> Element: The Complete Guide The <section> element is a semantic HTML ...