C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
HTML <output> tagHTML <output> tag is used to display the result of some calculation (performed by JavaScript) or the outcome of a user action (such as Input data into a form element). The <output> tag is a newly added tag and was introduced in HTML5. Syntax<output>......</output> Following are some specifications about the HTML <output> tag
Example<!DOCTYPE html> <html> <head> <title>Output Tag</title> </head> <body> <p>Calculate the Sum of the two Numbers</p> <form oninput="res.value=parseInt(a.value)+parseInt(b.value);"> <label>Enter First Value.</label><br> <input type="number" name="a" value=""/><br> +<br/> <label>Enter First Value.</label><br> <input type="number" name="b" value=""><br> =<br> Output is:<output name="res"></output> </form> </body> </html> Output: Attribute:Tag-specific attributes:
Global attribute:HTML <output> tag supports the global attributes in HTML. Event attribute:HTML <output> tag supports the event attributes in HTML. Supporting Browsers
Next TopicHTML paragraph Tag
|