- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML
The <output> tag in HTML is used to display the output of a calculation. It introduced in HTML5.
Following are the attributes −
- for - Relationship between the result of the calculation and the elements used in the calculation
- form - Forms the output element belongs to
- name - Name for the output element
Let us now see an example to implement the <output> tag −
Example
<!DOCTYPE html> <html> <body> <h2>Result</h2> <form oninput="n.value=parseInt(p .value)+parseInt(q.value)+parseInt(r.value)">0 <input type="range" id="p" value="25">100 +<input type="number" id="q" value="50">+<input type="number" id="r" value="50"> =<output name="n" for="p q r"></output> </form> </body> </html>
Output
Now, increase the slider and the result would get displayed −
Advertisements