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.

New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources