What is formmethod Attribute in HTML Form ? Last Updated : 25 Jul, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report What is formmethod Attribute?The form method attribute in HTML is used to define a HTTP technique that specifies how to send form-data to the backend server. This attribute is apply on <button> , <input type= "submit"> and <input type="image">. It overrides the feature of the method attribute of the <form> element. How to send data?The data can be sent to the server by using the URL variables using the GET method and as an HTTP post by using the POST method. What is the GET and POST Method?GET Method: In the GET method, after the submission of the form, the form values will be visible in the address bar of the new browser tab. It has a limited size of about 3000 characters. It is only useful for non-secure data but not for sensitive information. It supports Bookmarking the result. It can't be used to send binary data.POST Method: In the post method, after the submission of the form, the form values will not be visible in the address bar of the new browser tab as it was visible in the GET method. It appends form data inside the body of the HTTP request. It has no size limitation. This method does not support bookmarking of the result.Example: In this example, we will use form method attribute. HTML <!DOCTYPE html> <html> <head> <title> What is formmethod Attribute in HTML? </title> <style> h3 h2 { font-family: impact; } </style> </head> <body style="text-align: center;"> <h1 style="color: green;"> GeeksforGeeks </h1> <h3>What is formmethod Attribute in HTML?</h3> <form action="#" id="users" action="#" method="GET" target="_blank"> User_id: <input type="email" name="email" placeholder="Emter Email Id" /> <br /><br /> Password: <input type="password" name="pword" placeholder="Enter Password" /> <br /><br /> <input type="submit" value="Submit using GET method" formmethod="get" /> <input type="submit" formaction="#" value="submit using POST method" formmethod="post" /> </form> </body> </html> Output:Submit form using POST Method:Submit form using GET Method: Comment More infoAdvertise with us Next Article HTML | input formmethod Attribute M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML Web technologies HTML-Attributes HTML-Questions +1 More Similar Reads What is formenctype Attribute in HTML Form ? The HTML formenctype attribute is used to specify the type of encoding to be used when submitting the form. It defines how the form data should be encoded when it is sent to the server. It works with the input type "submit" and input type "image". The formenctype attribute is used when there are mul 2 min read HTML | input formmethod Attribute The HTML <input> formmethod Attribute is used to specify the HTTP method for sending form-data to the action URL. This attribute is used to override the method attribute of the <form> element. Syntax: <input formmethod="get | post"> Attribute Values: get: It has a default value. In 2 min read HTML formmethod Attribute The HTML formmethod Attribute is used to define the HTTP method that is used to send form data while submitting the form. GET and POST are the two well-known HTTP methods. This attribute overrides the feature of the method attribute of the <form> element. Supported tags: <input><butto 2 min read HTML | <button> formmethod Attribute The HTML button formmethod Attribute is used to specify the HTTP method used to send data while submitting the form. There are two kinds of HTTP methods, which are GET and POST. This Attribute is only used with the Button type="submit". Syntax: <button type="submit" formmethod="get|post"> Attr 2 min read HTML <input> form Attribute The HTML <input> form Attribute is used to specify interactive input fields for web-based forms. A form can contain multiple input fields to accept inputs from the users. It is the most powerful element in HTML. Syntax: <input form="form_id"> Attribute Value: This attribute contains a si 1 min read HTML | <input> formtarget Attribute The HTML <input> formtarget attribute is used to specify the name or a keyword which indicates where to display the response after submitting the form. This attribute overrides the target attribute of <form> element. Syntax: <input formtarget="_blank|_self|_parent|_top|framename"> 1 min read Like