HTML action Attribute
Example
<form action="action.php" method="get">
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname"><br>
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname"><br>
<input type="submit" value="Submit">
</form>
Meaning
The action attribute contains the URL of the server program that will process the contents of the form.
Some browsers also might support a mailto URL, which can mail the results to the specified address.
Otherwise, the delivery of the data in the form is defined by the method attribute.
Standard Syntax
<form action="URL">
Browser Support
Status
Applies to:
The action attribute can be used on the following element:
Attribute Values
Value | Description |
---|---|
URL | Value can be
|