Skip to content
Related Articles

Related Articles

Improve Article

HTML| action Attribute

  • Last Updated : 22 Apr, 2019

The HTML | action Attribute is used to specify where the formdata is to be sent to the server after submission of the form. It can be used in the <form> element.


<form action="URL">

Attribute Values:

URL: It is used to specify the URL of the document where the data to be sent after the submission of the form.
The possible values of the URL are:

  • absolute URL: It points to another website link. For Example:
  • relative URL: It is used to point to a file within a webpage. For Example:

Example-1: This Example illustrates the use of action Attribute.

<!DOCTYPE html>
        HTML action Attribute
    <h2>HTML action Attribute</h2>
    <form action="test.php" 
        <label for="username">
        <input type="text"
        <label for="password">
        <input type="password" 
    <button onclick="myGeeks()">
    <b>After Submitting the form-data will sent
      to the "test.php" page on the server.</b>


Supported Browsers: The browser supported by HTML action Attribute are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :