# HTML Form

> The part of a page where people type or pick things to send to a server.

**Field:** Software Development  
**Category:** Web Development  
**Also known as:** Web Form, Form, <form>

## Think of it like

Think of it like a paper form at the doctor's. You fill in the boxes and hand it to the desk.

## Definition

An HTML form is a part of a page that collects what people type. Sign-ups and search boxes are forms. It is made of fields such as text boxes, check boxes and drop-down lists, plus a button to send. When sent, the browser packs up the values and posts them to a server address. The browser can check simple rules first, like a field being required. The server must still check everything again.

## Example

Lucy's sign-up form asks for an email and a password. The browser stops her from sending it with the email box empty.

## Example code

```html
<form action="/signup" method="post">
  <input type="email" name="email" required>
  <button>Sign up</button>
</form>
```

One required email box and a button that sends it to /signup.

## Why it matters

Forms are how most data gets into a website. Sign-ups, orders and searches all start here.

## Common mistake

Leaving out the <label> for each field. Screen readers then cannot tell people what a box is for.

## Three principles

- **Fields and a button.** Type or pick, then send.
- **Browser checks first.** Simple rules like required.
- **Server checks again.** Never trust the browser alone.

## Related terms

- [HyperText Markup Language (HTML)](https://learn.benibix.com/term/development/html)
- [Browser Event](https://learn.benibix.com/term/development/browser-event)
- [Back End](https://learn.benibix.com/term/development/back-end)
- [Document Object Model (DOM)](https://learn.benibix.com/term/development/dom)
- [HTML Input Element](https://learn.benibix.com/term/development/html-input-element)

## Taught in

- [HTML Forms and Inputs](https://learn.benibix.com/learn/development-web/html-forms-and-inputs): HTML, CSS and JS, 6/14

---

Source: https://learn.benibix.com/term/development/html-form
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
