HTML | <form> name Attribute
The HTML <form> name Attribute is used to specify the name of a form Element. It is used to reference the form-data after submitting the form or to reference the element in a JavaScript.
Syntax:
<form name="name">
Attribute Values: It contains a single value name which describes the name of the <form> element.
Example:
<!DOCTYPE html> <html> <body style="text-align:center;"> <h1 style="color:green;"> GeeksForGeeks </h1> <h2>HTML Form name Attribute.</h2> <form id="users" action="#" name="Geeks"> First name: <input type="text" name="fname" value="Manas"> <br> Last name: <input type="text" name="lname" value="Chhabra"> <br> <input type="submit" value="Submit"> </form> </body> </html> |
chevron_right
filter_none
Output:

Supported Browsers:
- Google Chrome
- Firefox
- Edge
- Opera
- Apple Safari
Recommended Posts:
- HTML | <li> value Attribute
- HTML | dir Attribute
- HTML | alt attribute
- HTML | <img> src Attribute
- HTML | for Attribute
- HTML | max attribute
- HTML | <a> rel Attribute
- HTML src attribute
- HTML | <bdo> dir Attribute
- HTML | <img> alt Attribute
- HTML | name Attribute
- HTML | rel attribute
- HTML | min Attribute
- HTML | value Attribute
- HTML | <map> name Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



