<form>

The form element groups interactive controls for submitting data to a server.

Since HTML 2.0 Spec ↗

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

EnvironmentSince version
chrome 1.0
firefox 1.0
safari 1.0
edge 12

See also