html tutorial - action Attribute in HTML - html5 - html code - html form



Action attribute in html

Learn html - html tutorial - Action attribute in html - html examples - html programs

  • The action attribute is used to specifies the URL to send the form data when the form is submitted.

Syntax for action attribute:

<form action=”URL”>

Applies To:

Element Attribute
<form> action

action Attribute Value :

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

Sample coding for action attribute in :

Tryit<!DOCTYPE html>
<html>
    <head><title>Wikitechy action attribute</title></head>
    <body>
        <form action="submit.html">
            Technology:  <input type="text" name="technology"><br>
            Tutorial :  <input type="text" name="tutorial"><br>
            <input type="submit" value="Submit">
        <form>
    </body>
</html>

Code Explanation for action attribute :

action Attribute Code Explanation

  1. <form> element is used to create a data form.
  2. The action attribute specifies the URL as ”submit.html” to send the submitted form-data.
  3. The “submit” button used to submit the form data.

Output for action attribute in HTML:

action Attribute Output

  1. When user click the Submit button the form data will be submitted to “submit.html” page.
  2. action Attribute Output1 submitted values displayed
  3. In “submit.html” The submitted values will be displayed in the URL.

Browser Support for action attribute in HTML:

Yes Yes Yes Yes Yes

Related Searches to action Attribute in html