HTML5 the difference between the Input type HTML 4.01 and HTML 5
The following types are the new types in HTML5: color, date, datetime, datetime-local, month, week, time, email, number, range, search, tel, and URL.
Browser support
| Input Type |
IE |
Firefox |
Opera |
Chrome |
Safari |
| Email |
No |
4.0 |
9.0 |
10.0 |
No |
| Url |
No |
4.0 |
9.0 |
10.0 |
No |
| Number |
No |
No |
9.0 |
7.0 |
No |
| Range |
No |
No |
9.0 |
4.0 |
4.0 |
| Date pickers |
No |
No |
9.0 |
10.0 |
No |
| Search |
No |
4.0 |
11.0 |
10.0 |
No |
| Color |
No |
No |
11.0 |
No |
No |
Note: Opera has the best support for the new input type. However, you can already use them in all major browsers. Even if it is not supported, it can still be displayed as a regular text field.
| value |
Description |
| button |
Define clickable buttons (mostly used with JavaScript to launch scripts) |
| CheckBox |
Define the check box. |
| Color |
Defines the color picker. |
| Date |
Define date fields (with Calendar control) |
| Datetime |
Define date fields (with calendar and Time controls) |
| Datetime-local |
Define date fields (with calendar and Time controls) |
| Month |
month (with Calendar control) that defines a date field |
| Week |
Define Week for Date field (with Calendar control) |
| Time |
Defines the time, minute, and second of a date field (with the duration control) |
| Email |
Define text fields for e-mail addresses |
| File |
Define input fields and "Browse ..." button for file upload |
| Hidden |
Define hidden input fields |
| Image |
Define an image as a submit button |
| Number |
To define a numeric field with a spinner control |
| Password |
Defines the password field. The characters in the field are obscured. |
| Radio |
Defines a radio button. |
| Range |
Defines a numeric field with a slider control. |
| Reset |
Defines the reset button. The reset button resets all form fields to their original values. |
| Search |
Defines the text field to use for the search. |
| Submit |
Define the Submit button. The submit button sends data to the server. |
| Tel |
Defines a text field for a phone number. |
| Text |
Default. Defines a single-line input field in which users can enter text. The default is 20 characters. |
| Url |
Defines a text field for the URL.
|
HTML5 input type