<form>
The form element groups interactive controls for submitting data to a server.
Syntax
<form action="url" method="post">...</form> Examples
<form action="/subscribe" method="post">
<label for="email">Email</label>
<input id="email" name="email" type="email" required>
<button type="submit">Subscribe</button>
</form>
Output
Renders a labeled email field with a submit button that POSTs to /subscribe.
Notes
Native validation runs before submit when controls use required/type. Use method="post" for state changes and GET for idempotent queries. The novalidate attribute disables built-in validation.
Browser & runtime support
| Environment | Since version |
|---|---|
| chrome | 1.0 |
| firefox | 1.0 |
| safari | 1.0 |
| edge | 12 |