HTML <output> tag

You are Here:

HTML <output> tag

The <output> tag represents the result of a calculation or the outcome of a user action.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <form oninput="result.value=parseInt(a.value)+parseInt(b.value)"> <input type="range" name="b" value="50"> + <input type="number" name="a" value="10"> = <output name="result">60</output> </form> </body> </html>

Attributes

The following are the attributes of <output> tag. Also try Global attributes.

AttributeValueExplanation
forelement_idSpecifies the id of the <input> elements that are contributed to the output.
formform_idSpecifies one or more <output> element declared outside <form> element belongs to it.
namenameSpecifies the name of the element.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author