HTML action attribute
action
The purpose of the HTML action attribute is to specify the URL of a form processor (for example a PHP script which handles the form data).
Supported elements
HTML action attribute supports form element.
Syntax
<form action="value" >.....</form>
Type of value
Type of value of HTML action attribute is an URL.
Value
A URL containing a form processing script.
Default value
There is no default value of HTML action attribute.
Supported doctypes
HTML 4.01 strict, HTML 4.01 transitional, HTML 4.01 frameset.
Example of HTML action attribute with form
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Example of HTML action attribute with form</title>
</head>
<body>
<form action="action.php">
Email id : <input type="text" name="email" /><br />
Password : <input type="text" name="passw" /><br />
<input type="submit" value="Submit" />
</form>
</body>
</html>
Result

View this example in a separate browser window
Example of HTML action attribute with form.
Previous: HTML accesskey attribute
Next: HTML align attribute
- New Content published on w3resource:
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- React - JavaScript Library
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework