form action Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:form

Description

The action attribute sets where to send the form-data when a form is submitted.

Attribute Values

Value Description
URL Where to send the form-data when the form is submitted.

The following code shows how to create a form. On submit, send the form-data to a file named "/action_page.php" (to process the input):

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<form action="/action_page.php">
First name: <input type="text" name="FirstName" value="Mickey"><br>
Last name: <input type="text" name="LastName" value="Mouse"><br>
<input type="submit" value="Submit">
</form><!--from w  w w  .  jav a  2 s . c o m-->

</body>
</html>

Related Tutorials