Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • HTML Tutorial
  • HTML Exercises
  • HTML Tags
  • HTML Attributes
  • Global Attributes
  • Event Attributes
  • HTML Interview Questions
  • HTML DOM
  • DOM Audio/Video
  • HTML 5
  • HTML Examples
  • Color Picker
  • A to Z Guide
  • HTML Formatter
Open In App
Next Article:
How to specify the value of an input element using HTML ?
Next article icon

How to specify a name for the output element in HTML?

Last Updated : 16 Jun, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

The name attribute specifies the name of an <output> element. It is used to reference form data after it has been submitted, or to reference the element in JavaScript. The <output> tag is used to represent the result of a calculation.

The HTML <for> type attribute is used because it specifies the relationship between the result of the calculation and the elements used in the calculation. form is used because it specifies which form the output element it belongs to. name is used because it specifies a name for the output element.

Syntax:

<output name="name">

Example: In this example, we will specify a name for the output element.

HTML
<!DOCTYPE html> <html>    <body>     <h1>The output element</h1>     <form oninput=           "k.value=parseInt(x.value)+parseInt(y.value)">         <input type="range" id="x" value="20"> +         <input type="number" id="y" value="20">         = <output name="k" for="x y"></output>     </form> </body>  </html> 

Output:


Next Article
How to specify the value of an input element using HTML ?

S

subham348
Improve
Article Tags :
  • Web Technologies
  • HTML
  • Web technologies
  • HTML-Questions

Similar Reads

  • How to specify the name of an input element?
    To add the name of an input element, we use the HTML <input> name attribute. The HTML <input> name attribute is used to specify a name for an <input> element. It is used to reference the form data after submitting the form or to reference the element in JavaScript. Syntax:<input
    2 min read
  • How to specify a name for the fieldset using HTML ?
    The <fieldset> tag in HTML5 is used to make a group of related elements in the form and it creates the box over the elements. The <fieldset> tag is new in HTML5. The HTML <fieldset> name attribute is used to specify the name for the fieldset element. It is used to reference the for
    1 min read
  • How to set a name for keygen element in HTML5 ?
    In HTML, the <keygen> tag is used to specify a key-pair generator field during a form, and the <keygen> name attribute is used to set the name of the keygen element. The aim of <keygen> element is to supply a secure thanks to authenticate users. When a form is submitted then two ke
    2 min read
  • How to specify name of an iframe element using HTML ?
    The iframe in HTML stands for Inline Frame. The "iframe" tag defines a rectangular region within the document in which the browser can display a separate document, including scrollbars and borders. An inline frame is used to embed another document within the current HTML document. The HTML iframe na
    1 min read
  • How to specify the value of an input element using HTML ?
    In this article, we will set the value of an input element using HTML. The value attribute for <input> element in HTML is used to specify the initial value of the input element. It has different meaning for different input type: The “button”, “reset” and “submit” property specifies the text on
    1 min read
  • How to specify the name for drop-down list in HTML5 ?
    Drop-down lists are also another way to allow people to choose only one choice from a number of alternatives. Since the default option is usually the first item on the list, using the drop-down list can be a safe choice if you know that one option is always preferred over the others. The drop-down l
    4 min read
  • How to specify the main content of a document in HTML5 ?
    The <article> tag is one of the new sectioning element in HTML5. The HTML article tag is used to represent an article. More specifically, the content within the <article> tag is independent of the other content of the site (even though it can be related). In other words, the article elem
    2 min read
  • How to specify an alternate text for an image in HTML ?
    The alternative text for an image is useful when the image not displayed/loaded. If the image is not loaded the its alternative text is displayed on the web page. Alternative text is the alternative information for an image. Example 1: In this example, the image path contains the image so it will di
    1 min read
  • How to specify a shorter label for an option in HTML5 ?
    The HTML option label attribute specifies the text value that defines the option's shorted label. In the drop-down list, the shorter version will be shown. An object stored in a <select>, <optgroup>, or <datalist> element is defined by the HTML <option> element. As a result,
    2 min read
  • How to set the name for the object in HTML5?
    <object> element in HTML5 is used to link any external files and resources in the form of any image or any nested linked webpages or content or any plugin that can do the same work. Syntax: <object name="name"></object>Elementary uses of <object/ element: Initially <object
    2 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences