Basic Of Forms In HTML :

Forms is a tag in HTML which are used to get the information from the user e.g. Name, Email, Address, etc.

Input tag is used for getting the different types of inputs from the user with the help of ( type Attribute ).

Basic syntax:

<form>

<label for = "Desired Class Name of input Box " > "Content"</label>

<input type = " Desired Type " class = "className" ></input>

<form>

On clicking on the content of the label tag it will automatically move your cursor to the input box of that className.

Input type Values :

1) Text: It is used to take string information from the user e.g. Name, Location, etc.,

<input type="text" ></input> // It will create a search box-like box where the user can fill in the required information.

2) Email: It is used to take Email information from the user. The format of the email is automatically generated and in case of invalid input then a message pop will display regarding invalid input.

<input type="email" ></input> // It will create a search box-like box where the user can fill in the required information.

3) date: It is used to select the date.

<input type="email" ></input> // User can choose date manually (by choosing date month and year)

4) number: It is used to take the number input. It also has various attributes such as max-length and min-length where you can set the range of the number.

<input type=" number" ></input> // User can choose number manually. It also has a drop-down button through which you can increase or decrease your number value. In case of input other than a number, it will display invalid input.

5) submit: It is used to create a submit button.

<input type="submit" value = "submit"></submit>

here value attribute is used as a default value of the button.

6) Radio: For choosing any one value from the given value.

7) Checkbox: For choosing multiple values.

// For Taking input of address of multiple rows, a textarea tag is used.

<textarea rows="1" cols="5"> </textarea> //Here the input box will be there which will be of the length of one row and 5 columns so that the user can fill in the desired input in that area.

// Select tag: It is used to create a drop-down list. where the user can choose any of them.

<select>

<option> arbaz </option>

<option> shaikh </option>

</select>