html tutorial - Output tag in HTML - html5 - html code - html form

output tag in html

Learn html - html tutorial - output tag in html - html examples - html programs

  • The <output> tag shows the result of a calculation.
  • The <output> tag belongs to flow content, phrasing content, form-associated element, listed, labelable, resettable and palpable content.
  • The <output> tag supports Global Attributes and Event Attributes.

Syntax for output tag:

<output name = “name”>content</output>

Differences between HTML 4.01 and HTML5 for <output> tag:

HTML 4.01

  • HTML4 does not supports <output> tag.


  • The <output> tag is new in HTML5.

Sample Coding for <output> tag:

Tryit<!DOCTYPE html>
<html >
        <title>Wikitechy output tag</title>
        <h2>HTML output tag with example</h2>
        <form oninput="c.value=a.value+b.value">
            <input type="text" name="a" value="Wiki">+
            <input type="text" name="b" value="techy">=
            <output name="c"></output>

Code Explanation for <output> tag:

code explanation for output tag

  1. oninput event triggers when user gives any input if the event triggered the concatenated string of and b will be stored in c.
  2. The <input> tag textbox named as a and its value will be “Wiki”.
  3. The <input> tag textbox named as b and its value will be “techy”.
  4. The <output> tag named as c and that will be show the concatenated output of a and b.

Output of <output> tag:

output for output tag

  1. The output shows the two textboxes with values as “Wiki” and “Techy”.
  2. output2 for output tag user changes the text
  3. When the user change the text in the text box that will be manipulated and displayed in the output.


Attribute HTML 4.0.1 HTML 5 Description
form no Yes The <output> tag belongs to specify one or more forms.
name no Yes Defines a name for the <output>tag.
for no Yes Indicates the relation between the result of the calculation, and the elements used in the calculation.

Browser Support for <output> tag:

10.0 No 4.0 5.1 11.0

Related Searches to output tag in html

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add to your ad blocking whitelist or disable your adblocking software.