The form Element action method enctype
Set up a form element with action, method, and enctype.
What Is a Form?
HTML forms are the primary way users submit data to a server:
- Login and registration
- Search queries
- Checkout and payment
- Contact and feedback
Every form starts with the <form> element.
The form Element
The <form> element wraps all form controls:
<form action="/submit" method="post">
<!-- form controls go here -->
<button type="submit">Send</button>
</form>
<!-- When the user submits, the browser sends the form data
to the URL specified in action using the method specified -->All lessons in this course
- The form Element action method enctype
- Input Types text password email number tel
- The label Element and Accessibility
- The button Element submit reset button