HTML <form> action Attribute
Example
On submit, send the form-data to a file named "demo_form.asp" (to process the input):
<form
action="demo_form.asp"
method="get">
First name: <input type="text" name="fname"><br>
Last name:
<input type="text" name="lname"><br>
<input type="submit" value="Submit">
</form>
Try it yourself »
Definition and Usage
The action attribute specifies where to send the form-data when a form is submitted.
Browser Support
Attribute | |||||
---|---|---|---|---|---|
action | Yes | Yes | Yes | Yes | Yes |
Differences Between HTML 4.01 and HTML5
In HTML5, the action attribute is no longer required.
Syntax
<form action="URL">
Attribute Values
Value | Description |
---|---|
URL | Where to send the form-data when the form is submitted. Possible values:
|
HTML <form> tag