What is the HTML action attribute?

Overview

The action attribute in HTMLHyperText Markup Language is used to specify where to send the data of a form.

Syntax


<form action="URL">

Parameters

  • URL: This is used to define the link or URL where we want our data to be sent once the form is submitted.

Example

The HTML code provided below demonstrates how to use the action attribute:

Explanation

We make a form. When the form is submitted, the data is sent to the signup page on the server.