FORMS

Next project: do something with the input...

HTML5 types for input

EMAIL
input type=email
TELEPHONE
input type=tel
URL
input type=url
SEARCH
input type=search
SUBMIT
input type=submit

DATE
input type=range
Chrome - Month/Day/Year, pull down month
Safari - up-down YYYY-MM-DD
DATETIME
Safari - up-down YYYY-MM-DDTHH:MMZ
DATETIME-LOCAL
Safari - up-down YYYY-MM-DDTHH:MM

MONTH
Safari - up-down YYYY-MM
WEEK
Safari,Chrome - up-down YYYY-Www
TIME
Safari - up-down HH:MM
NUMBER
Safari, Chrome - up-down {1,2..n}
COLOR
Chrome - color selection dialogue
RANGE
Chrome, Safari - slider

The <datalist> element

The HTML5 <datalist> tag is used for providing an "autocomplete" feature on form elements.
It enables you to provide a list of predefined options to the user while data is input.



The <datalist> tag can be used in conjunction with an <input> element that contains a list attribute. The list attribute is linked to the <datalist> tag by the <datalist> tag's ID.

For example, if the datalist tag contains id="myData", then the list attribute will look like this: list="myData".
You can fill the datalist element by nesting option tags inside the datalist tag.

HTML5 attributes for form, input

New attributes for form: New attributes for input