Input types in HTML5

There are many input types in html5 which are explained below with source code.

List of input types

1) button
2) color
3) email
4) checkbox
5) file
6) hidden
7) image
8) month
9) number
10) password
11) radio
12) color
13) range
14) reset
15) search
16) submit
17) tel
18) text
19) time
20) url


Input type examples

For email:
<input type="email">
This input type is used for getting only valid email.

For telephone no# :
<input type="tel">
This input type used to fetch telephone number.

For file location:
<input type="url">
This is used location url.

For submit:
<input type="submit">
Submits the form data to the server

Reset form:
<input type="reset">
Resets the form controls to their default settings

Image buttons
<input type="image">
For using image buttons

Custom input button
<input type="button">
For using custom input buttons

Radio button:
<input type="radio">
For using radio button

Checkbox buttons:
<input type="checkbox">
For making checkbox button

Search field:
 <input type="search">.
This input type is used for searching some thing.

The datalist Element

<p>Education completed:
<input type="text" list="edulevel" name="education">
<datalist id="edulevel">
<option value="High School">
<option value="Bachelors Degree">
<option value="Masters Degree">
<option value="PhD">
</datalist>
</p>

Output of above code

Education completed:

click on the empty input field and select the given default. options.










The Best

Comment here

If you have any query, if you want to know something about any of technical course related to computer science field, if you have any suggestion about relevant to uploaded content or if you anything wrong here (any mistake in content) than please contact us. Keep in mind, comment should be according to community guidelines.