Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML form action Attribute

HTML
The action attribute

HTML form Tag Reference HTML Tag

Example

When the form is submitted, send the form data to a file named "demo_form.html" (processing the input):

  First name:

  Last name:

 

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the action attribute.


Definition and Usage

The action attribute specifies where to send the form data when the form is submitted.


Differences between HTML 4.01 and HTML5

In HTML5, the action attribute is no longer required.


Syntax

  • Relative URL - points to a file within the website (for example action="example.htm")
  • |

    HTML form Tag Reference HTML tag