Forms

An HTML form collects user input and sends it: a <form> element with action and method, <input>, <select> and <textarea> fields, and a submit button. Each field has a name and a <label> associated through for/id, which is essential for accessibility.

Example

<form method="post">
  <label for="email">Email</label>
  <input id="email" name="email" type="email">
  <button>Send</button>
</form>

Related concepts

The whole glossary