Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

HTML output tag

HTML output tag with examples, html5, forms, input, text, anchor, image, heading, marquee, textarea, paragraph, title, quotes, code etc.

<< Back to HTML

HTML <output> tag

HTML <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.



Following are some specifications about the HTML <output> tag

Display Inline
Start tag/End tag Both Start and End tag
Usage Forms and Input


<!DOCTYPE html>
<title>Output Tag</title>
 <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>
 	<label>Enter First Value.</label><br> 
 	<input type="number" name="b" value=""><br>
 	Output is:<output name="res"></output>
Test it Now


HTML output tag


Tag-specific attributes:

Attribute Value Description
for element_id It specifies the list of other element's ids which indicates the relationship between the result of the calculation and the input elements.
form form_id It specifies the form element to which this element is associated with.
name name It defines the name for the output element.

Global attribute:

HTML <output> tag supports the global attributes in HTML.

Event attribute:

HTML <output> tag supports the event attributes in HTML.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
Next TopicHTML paragraph Tag

Related Links:

Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf