From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/html/element%2Foutput.html | 124 +++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 devdocs/html/element%2Foutput.html (limited to 'devdocs/html/element%2Foutput.html') diff --git a/devdocs/html/element%2Foutput.html b/devdocs/html/element%2Foutput.html new file mode 100644 index 00000000..6ecd439b --- /dev/null +++ b/devdocs/html/element%2Foutput.html @@ -0,0 +1,124 @@ +

<output>: The Output element

The <output> HTML element is a container element into which a site or app can inject the results of a calculation or the outcome of a user action.

+

Attributes

+
+

This element includes the global attributes.

for

A space-separated list of other elements' ids, indicating that those elements contributed input values to (or otherwise affected) the calculation.

form

The <form> element to associate the output with (its form owner). The value of this attribute must be the id of a <form> in the same document. (If this attribute is not set, the <output> is associated with its ancestor <form> element, if any.)

This attribute lets you associate <output> elements to <form>s anywhere in the document, not just inside a <form>. It can also override an ancestor <form> element.

name

The element's name. Used in the form.elements API.

The <output> value, name, and contents are NOT submitted during form submission.

+
+

Examples

+
+

In the following example, the form provides a slider whose value can range between 0 and 100, and an <input> element into which you can enter a second number. The two numbers are added together, and the result is displayed in the <output> element each time the value of any of the controls changes.

+

html

+
<form oninput="result.value=parseInt(a.value)+parseInt(b.value)">
+  <input type="range" id="b" name="b" value="50" /> +
+  <input type="number" id="a" name="a" value="10" /> =
+  <output name="result" for="a b">60</output>
+</form>
+
+
+
+

Result

+
+ + +
+

Accessibility Concerns

+

Many browsers implement this element as an aria-live region. Assistive technology will thereby announce the results of UI interactions posted inside it without requiring that focus is switched away from the controls that produce those results.

+

Technical summary

+
Content categories Flow content, phrasing content, listed, labelable, resettable form-associated element, palpable content.
Permitted content +Phrasing content.
Tag omission None, both the starting and ending tag are mandatory.
Permitted parents Any element that accepts phrasing content.
Implicit ARIA role status
Permitted ARIA roles Any
DOM interface HTMLOutputElement
+

Specifications

+
+ + +
Specification
HTML Standard
# the-output-element
+

Browser compatibility

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariWebView AndroidChrome AndroidFirefox for AndroidOpera AndroidSafari on IOSSamsung Internet
output10≤184No1174.41841171.0
for10≤184No1174.41841171.0
form10≤184No1174.41841171.0
name10≤184No1174.41841171.0
+

+ © 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
+ https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output +

+
-- cgit v1.2.3