# HTML Input Element

> The HTML tag for a box you fill in, like a text box or a tick box.

**Field:** Software Development  
**Category:** Web Development  
**Also known as:** <input>, Input Tag, Input Field, Form Input

## Think of it like

It is like a blank on a paper form. You write your answer in the box.

## Definition

The input element is the HTML tag that makes a box or control a visitor can fill in. Its type attribute says what kind it is. There are 22 types, like text, email, password, checkbox, date and range. If you leave the type out, it is a plain text box. An input has no closing tag. Inputs sit inside a form, and each one needs a label so people know what to type.

## Example

Lucy's sign-up form uses type email for the email box. On a phone, the keyboard now shows an @ key, and the browser checks the address.

## Example code

```html
<label for="email">Email</label>
<input id="email" type="email" name="email" required>
```

A labelled email box. The browser will not send the form while it is empty.

## Why it matters

The right type gives people the right keyboard and free checks. A date type even brings its own calendar.

## Common mistake

Using type text for everything. Then phones show the wrong keyboard, and you must write all the checks yourself.

## Three principles

- **Type decides.** The type sets the box and its checks.
- **No closing tag.** It is one tag, with no end tag.
- **Always labelled.** A label says what goes in the box.

## Related terms

- [HTML Form](https://learn.benibix.com/term/development/html-form)
- [HTML Element](https://learn.benibix.com/term/development/html-element)
- [HTML Attribute](https://learn.benibix.com/term/development/html-attribute)
- [Input Validation](https://learn.benibix.com/term/development/input-validation)
- [Browser Event](https://learn.benibix.com/term/development/browser-event)
- [Accessibility (a11y)](https://learn.benibix.com/term/design/accessibility)

## Taught in

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

![A small sign-up form. Each row is one input with its type written beside it: a text box for the name, type text; a box for the email, type email; a box with dots, type password; a calendar box, type date; a slider, type range; a tick box, type checkbox; and a Join button, type submit.](https://learn.benibix.com/diagrams/dev5-input-types.svg)

---

Source: https://learn.benibix.com/term/development/html-input-element
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-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
