HTML <output> name Attribute Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report HTML <output> name attribute specifies the name of the element, which is submitted with the form data when the form is submitted. It's useful for associating the output with a form element. HTML <output> name Attribute Syntax: <output name="text"> HTML <output> name Attribute Values:It contains the value i.e. name which specifies the name for the <Output> element. HTML <output> name Attribute Example: In this example, we parse input values, calculate the sum, and display the result in real-time using the output element. html <!DOCTYPE html> <html> <head> <title> HTML Output name Attribute </title> </head> <body> <center> <h1 style="color:green"> GeeksforGeeks </h1> <h2>HTML Output name Attribute</h2> <form oninput="sumresult.value = parseInt(A.value) + parseInt(B.value) + parseInt(C.value)"> <input type="number" name="A" value="50" /> + <input type="range" name="B" value="0" /> + <input type="number" name="C" value="30" /> <br> Result: <output name="sumresult"> </output> </form> </center> </body> </html> Output: HTML <output> name Attribute Example Explanation:In the above-example ontains a form element with three input fields: two number inputs and one range input.The oninput attribute in the form tag calculates the sum of the values entered in the input fields and assigns it to the output element with the name sumresult.The <output> element displays the result of the calculation dynamically as the inputs change.Users can interact with the inputs to see the real-time sum displayed in the output element.HTML <output> name Attribute Use Cases1. How to specify a name for the output element in HTML?To Specify a name for the output element in HTML using the name attribute within the <output> tag. 2.How to define one or more forms the output element belongs to ?Here we use the form attribute in the <output> tag to specify one or more forms the output element belongs to. HTML <output> name Attribute Supported Browsers:Google Chrome 10.0Firefox 4.0Edge 18.0Opera 11.0Apple Safari 7.0 Create Quiz Comment M manaschhabra2 Follow 0 Improve M manaschhabra2 Follow 0 Improve Article Tags : Web Technologies HTML HTML-Attributes Explore HTML BasicsHTML Introduction4 min readHTML Editors4 min readHTML Basics7 min readStructure & ElementsHTML Elements4 min readHTML Attributes7 min readHTML Headings3 min readHTML Paragraphs3 min readHTML Text Formatting4 min readHTML Block and Inline Elements3 min readHTML Charsets4 min readListsHTML Lists3 min readHTML Ordered Lists5 min readHTML Unordered Lists4 min readHTML Description Lists3 min readVisuals & MediaHTML Colors11 min readHTML Links Hyperlinks2 min readHTML Images7 min readHTML Favicon4 min readHTML Video4 min readLayouts & DesignsHTML Tables10 min readHTML Iframes4 min readHTML Layout4 min readHTML File Paths3 min readProjects & Advanced TopicsHTML Forms5 min readHTML5 Semantics5 min readHTML URL Encoding4 min readHTML Responsive Web Design11 min readTop 10 Projects For Beginners To Practice HTML and CSS Skills8 min readTutorial ReferencesHTML Tags - A to Z List15+ min readHTML Attributes Complete Reference8 min readHTML Global Attributes5 min readHTML5 Complete Reference8 min readHTML5 MathML Complete Reference3 min readHTML DOM Complete Reference15+ min readHTML DOM Audio/Video Complete Reference2 min readSVG Element Complete Reference5 min readSVG Attribute Complete Reference8 min readSVG Property Complete Reference7 min readHTML Canvas Complete Reference4 min read Like