Name

output — HTML5

Synopsis

<output> . . . </output>

Represents the result of a calculation, most likely the output of a script.

Notes

HTML5 only.

Start/End Tags

Required/Required

Attributes

HTML5 Global Attributes

for="text"

Creates an explicit relationship between the calculation result and a named element or elements on the page.

form="id of form owner"

Explicitly associates the input control with its associated form (its form owner). With this method, the input control does not need to be a child of the applicable form element.

name="text"

Give an identifying name to the element.

Example

Total: <output name="total" onformchange="value = 
round1.value + round2.value">0</output>

Get HTML & XHTML Pocket Reference, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.