In this section, we will introduce you to about the <output> tag. The output tag is used for displaying result of calculation on browser. The <output> tag is not present in HTML5. It has both start and end tag.
Attribute of option:| Attributes | Value | Description |
| name | string | Specify name of output element |
| form | id | Related form name. |
| for | id | Id of one or more related field |
| <output name=""> Text </output> |
|
<!doctype html > <html ><head> <title>Document title.</title> <script type="text/javascript"> function multi() { a=parseInt(prompt("Enter first number.",0)); b=parseInt(prompt("Enter first number.",0)); document.forms["form"]["result"].value=a*b; } </script></head> <body onload="multi()"> <h1>output tag Example.</h1> <p><b>Implementation of <output > in HTML5.</b></p> <form action="roseindia.html" method="get" name="form"> <label>Multiplication of two number:</label> <output name="result"> </output> </form></body> </html> |

The <output> tag is available in both HTML5. It is not present in HTML4.01.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.