---
title: HTML Forms
---
## HTML Forms
Basically, forms are used to collect data entered by a user, which are then sent to the server for further processing. They can be used for different kinds of user inputs, such as name, email etc.
Form contains control elements which are wrapped around ```
``` tags, like ```input```, which can have types like:
- ```text```
- ```email```
- ```password```
- ```checkbox```
- ```radio```
- ```submit```
- ```range```
- ```search```
- ```date```
- ```time```
- ```week```
- ```color```
- ```datalist```
- ```button```
- ```datetime-local```
- ```file```
- ```hidden```
- ```image```
- ```month```
- ```number```
- ```reset```
- ```tel```
- ```url```
Code example:
```html
```
![Screenshot of Code Above](https://i.imgur.com/r0br52L.png "Screenshot of Code Above")
Other elements that form can contain:
- ```textarea``` - is a multiline box which is most often used for adding some text eg. comment. Size of textarea is defined by number of rows and columns.
- ```select``` - together with `````` tag creates drop-down select menu.
- ```button``` - The button element can be used to define a clickable button.
- ```fieldset```- It groups related elements in a form.
- ```legend```- It defines a caption for a