Advantage of using HTML 5 form input types is that it is cross-platform enabled with mobile devices.
The mobile keyboard will change according to what input type it is.
HTML 5 input types:
Input Type | Description | HTML Markup |
---|---|---|
date | A control for entering the date. | <input type="date"> |
datetime | Date and time using UTC date and time format | <input type="datetime"> |
datetime-local | Date and time according to your local time | <input type="datetime-local"> |
month | Month and year | <input type="month"> |
time | The time of day | <input type="time"> |
week | Allows you to pick the week and year. | <input type="week"> |
color | Allows you to enter asimple color value (which is in hexadecimal color notation) | <input type="color""> |
email | Validates the input using the standard email format | <input type="email"> |
tel | Gives you the ability to validate telephone numbers format against a pattern | <input type="tel"> |
search | Searches a data set (like a <datalist> HTML element) | <input type="search"> |
range | A slider control for picking a number in between two numbers | <input type="range"> |
number | Accepts numbers only | <input type="number"> |
url | Accepts URLs only | <input type="url"> |
Cheers.
Great article. Useful information. Thanks for Posting.
ReplyDeletehttp://www.cavinitsolutions.com/