HTML5 input types
HTML5 comes with a whole host of new input types. These new types are designed to provide formatting, validation, and in some cases, selectors. For touch devices some of them provide a different set of keys for the keyboard. Not all of the new input types are supported by all browsers yet. Fortunately for us, if a browser doesn't support a type it will just display it as a normal text field. Unfortunately for us, you can't depend on the browser to provide the correct formatted data if the unsupported types are only shown as text fields. So make sure you have a backup plan if you are going to use them.
Here are a few of the more useful new input types with images of the ones that are supported by Chrome.
Note
See examples in Chapter 3/input-types/input-types.html
.
Color
The
color
input type is used to choose a color. When clicked it usually displays a color picker. The value is a hex color specifier (for example, #FF0000). This control isn't widely supported for now, so use...