Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY CYBERSECURITY DATA SCIENCE
     ❯   

HTML action Attribute


Definition and Usage

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


Applies to

The action attribute can be used on the following element:

Element Attribute
<form> action

Example

Form Example

On submit, send the form-data to a file named "/action_page.php" (to process the input):

<form action="/action_page.php" method="get">
  First name: <input type="text" name="fname"><br>
  Last name: <input type="text" name="lname"><br>
  <input type="submit" value="Submit">
</form>
Try it Yourself »

Browser Support

Attribute
action Yes Yes Yes Yes Yes