HTML <form> action attribute
Definition and Usage
action
The attribute specifies where to send the form data when submitting the form.
Example
When submitting a form, send the form data to a file named "action_page.php" (used for processing input):
<form action="/action_page.php" method="get"> <label for="fname">First Name:</label> <input type="text" id="fname" name="fname"><br><br> <label for="lname">Last Name:</label> <input type="text" id="lname" name="lname"><br><br> <input type="submit" value="Submit"> </form>
Syntax
<form action="URL">
Attribute Value
Value | Description |
---|---|
URL |
Specifies where to send form data when a form is submitted. Possible Values:
|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |