Output tag in HTML 5
The HTML
<output> tag is used for displaying or showing the
result of a calculation or operation, such as one performed by a script. The
<output> tag was first introduced in HTML 5.Attributes
HTML tags contain one or more attributes.
There are 3 kinds of attributes that you can add to your HTML tags:
Element-specific, global, and event attributes.
The attributes that you can add to this tag are listed below.
Element-Specific Attributes
The following table shows the attributes that are specific to the output tag
in HTML 5.
| Attribute | Description |
| for | Specifies one or more elements the output field relates to |
| form | Specifies one or more forms the output field belongs to |
| name | Specifies the name of this element. |
Global Attributes
The following attributes are standard across all HTML 5 tags and hence are
also applicable to the output tag.
| Attribute | Attribute | Attribute |
| accesskey | draggable | style |
| class | hidden | tabindex |
| contenteditable | id | title |
| contextmenu | lang | |
| dir | spellcheck |
For a full explanation of these attributes, see HTML 5 global attributes.
Join the conversation! Your thoughts help the community grow.