HTML Form Attributes
What are Form Attributes?
Form attributes define how a form behaves and where data is sent.
Example
<form action="submit.php" method="post" target="_blank"> <label>Name:</label><br> <input type="text" name="name"><br><br> <label>Email:</label><br> <input type="email" name="email"><br><br> <button type="submit">Submit</button> </form>
action
Where form data is sent
method
GET or POST method
target
Where response opens
Live Preview
Summary
- action = where data goes
- method = GET / POST
- target = new tab or same tab