VOOZH about

URL: https://www.geeksforgeeks.org/html/html-input-formmethod-attribute/

โ‡ฑ HTML input formmethod Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML input formmethod Attribute

Last Updated : 19 May, 2026

The formmethod attribute is used to specify the HTTP method used to send form data. It overrides the method attribute of the <form> element for a specific submit button.

  • Defines the method used for form submission, such as GET or POST.
  • Works with <input type="submit"> and <input type="image">.
  • Overrides the formโ€™s default method attribute for that submission.

Syntax:

<input formmethod="get | post">

Attribute Values:

  • GET: Sends form data through the URL, making it visible in the address bar. It is suitable for non-sensitive data and supports limited data size.
  • POST: Sends form data inside the HTTP request body, so it is not visible in the URL. It supports larger data and is more secure than GET.

Output:

๐Ÿ‘ Image

Supported Browsers

The browsers supported by HTML input formmethod Attribute are listed below:

  • Google Chrome 9.0
  • Edge 12.0
  • Internet Explorer 10.0
  • Firefox 4.0
  • Safari 5.0
  • Opera 12.1
Comment
Article Tags: