Thursday, 13 June 2013

HTML 5 form input types

http://sixrevisions.com/html5/new-html5-form-input-types/

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 TypeDescriptionHTML Markup
dateA control for entering the date.<input type="date">
datetimeDate and time using UTC date and time format<input type="datetime">
datetime-localDate and time according to your local time<input type="datetime-local">
monthMonth and year<input type="month">
timeThe time of day<input type="time">
weekAllows you to pick the week and year.<input type="week">
colorAllows you to enter asimple color value (which is in hexadecimal color notation)<input type="color"">
emailValidates the input using the standard email format<input type="email">
telGives you the ability to validate telephone numbers format against a pattern<input type="tel">
searchSearches a data set (like a <datalist> HTML element)<input type="search">
rangeA slider control for picking a number in between two numbers<input type="range">
numberAccepts numbers only<input type="number">
urlAccepts URLs only<input type="url">

Cheers.

1 comment:

  1. Great article. Useful information. Thanks for Posting.
    http://www.cavinitsolutions.com/

    ReplyDelete