← Cheat Sheets
HTML Form Input Types
Input types and validation attributes.
# HTML Form Input Types
Input types and validation attributes.
| Type | Purpose |
|---|---|
| `text` `email` `password` `tel` `url` `search` | Text variants with matching keyboards |
| `number` `range` | Numeric entry and slider |
| `date` `time` `datetime-local` `month` `week` | Date and time pickers |
| `checkbox` `radio` | Choices |
| `file` | Upload |
| `color` | Color picker |
| `hidden` | Hidden value |
| `submit` `reset` `button` | Buttons |
**Useful attributes:** `required`, `pattern`, `min`, `max`, `step`, `minlength`, `maxlength`, `placeholder`, `autocomplete`, `disabled`, `readonly`, `multiple`.
Every input needs a `label` (`for` matches `id`).