Java code for validating email address
If the "list" attribute is specified, then the intention is that the browser lets the user choose among a set of email addresses defined separately with the "datalist" element. If the "list" attribute is not specified, then the intention is that the browser supplies some help in entering a legal URL (e.g., the i Phone browser uses a URL-optimized keyboard) and/or validation on submission.
As of January 2013, the latest versions of Firefox and Chrome do good validation of the value on submission.
HTML5 defines a variety of new input types: sliders, number spinners, popup calendars, color choosers, autocompleting suggest boxes, and more.
The beauty of these elements is that you can use them now: for browsers that don't support a particular input type, there is automatic fallback to standard textfields.
So, use the number (spinner) input type if you want to let the user choose an exact value.
Browsers are supposed to use a horizontal slider unless you attach CSS that specifies a smaller width than height, in which case they are supposed to use a vertical slider.
Safari uses an interface that looks like a number spinner but increments the yyyy-mm-dd string one day at a time.
As of January 2013, the latest version of Opera has no difference in look on input, but performs email address validation on submission.
There are also closely related elements to let you select a month (input type="month"), week (input type="week"), time (input type="time"), date and time in global format (input type="datetime"), and date and time in local format/timezone (input type="datetime-local").