HTML action Attribute defines the URL of the page where the form data should be sent for it's further processing. HTML action Attribute is used inside form tag.
Table of Contents
Syntax of HTML action Attribute
The Syntax of HTML action Attribute is shown below.
<form action="url">
</form>
Usage of HTML action Attribute
HTML action Attribute is used to specify the location of file or page where form data is sent. Server-side language is used to process the form data. The location or url defined is of the file which is stored on server-side.
Used For
HTML action Attribute is used for following tags.
Tag Name |
---|
HTML form Tag |
Example of HTML action Attribute
Simple example of HTML action Attribute is given below.
<form action="/form-action.php">
</form>
In above example we have used HTML action Attribute inside the form tag to define the url of page where form data will be sent.
Values of HTML action Attribute
Two types of values or urls can be used with HTML action Attribute.
Value | Description |
---|---|
An absolute URL | URL of another website. |
A relative URL | URL of page within the website. |
Browser Support for HTML action Attribute
HTML action Attribute is supported by following major browsers.
Browser Name | Version |
---|---|
Chrome | All |
Firefox | All |
Opera | All |
IE / Edge | All |
Safari | All |