VOOZH about

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

⇱ HTML <input> formaction Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <input> formaction Attribute

Last Updated : 25 May, 2026

The formaction attribute is used to specify the URL where form data will be submitted. It overrides the action attribute of the <form> element for a specific submit button.

  • Defines a custom submission URL for the form data.
  • Works with <input type="submit"> and <input type="image">.
  • Overrides the form’s default action attribute when used.

Syntax: 

<input formaction="URL"> 

Attribute Values: It contains single value URL which is used to specify the URL of the document where the data to be sent after submission of the form. The possible value of URL are:

  • absolute URL: It points to the full address of a page. For example: www.geeksforgeeks.org/data-structure
  • relative URL: It is used to point to a file within in a webpage. For Example: gfg.php
Comment
Article Tags: