HTML output tag

HTML output tag is used to specify the result of the calculation.

The output can be a result of the calculation performed by the script or the result of user interaction with the form submission.


  • You should also read the HTML Form tag

Syntax

Output

Below is the result of the calculation of c=a+b. c is the name of output tag, a and b are the id’s of input elements with type range and number.

Scroll this using your mouse.


0100

+
=

List of HTML output tag attributes


Sr. No.Attribute optionsDescription
1forSpecify the relationship between the result and inputs. The value of the for attribute can be a list of id’s of input elements.
2formThis specified the form element that the output is related to. The value of this attribute id the id of the form element.
3nameThis specifies the name of the output element

Resources and References

1. W3C Specification.
2. HTML living standard
3. W3C project using Github

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.