Attributes · <output>
Which attributes does <output> use?
Associate the result with its inputs and give it a script-friendly name.
| Attribute | What it does | Docs |
|---|---|---|
for | Space-separated list of control ids this result depends on, such as for="a b". Helps browsers associate the output with those fields. | MDN |
form | The id of a <form> when the output sits outside that form but still belongs to it. | MDN |
name | Lets scripts reach the element as total.value in an oninput handler or from JavaScript. Unlike inputs, the name is not sent when the form submits. | MDN |




