# HTML Forms



HTML Forms  are used to take the information from User. Just like Facebook login page or Amazon sign up page etc... And the user input is most often sent to server for processing.

In the Form tag action attribute is where we write  our "url". So, When the user clicks the "Submit" button, the form-data will be sent to that particular "url".

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1657999901617/3CEMuGqiV.png align="left")

Label tag is used to create labels for input fields. So the User knows what to input on the first text area.
Inside Label tag we should always mention "for" attribute. It is recommendable for accessibility and also to process relevant information on the server side.

Input tag is used to create a text area where user can input their data. Input tag is same like break tag its a self closing tag. Its always a good idea to write "input type" so the browser will give us what we want like below and also good practice to include "id" and "name"
 
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1657999869819/_khwdG88-.png align="left")


input type="text": Displays a single-line text input field

input type="radio":	Displays a radio button (for selecting one of many choices)

input type="checkbox": Displays a checkbox (for selecting zero or more of many choices)

input type="submit":	Displays a submit button (for submitting the form)

input type="button":	Displays a clickable button


![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1658000947706/rSqBTe9eD.png align="left")

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1658000457584/blz2zXy_E.png align="left")


