New HTML5 input type values

Posted in Articles

Tweet This Share on Facebook Bookmark on Delicious Digg this Submit to Reddit

The “input” element has an “type” attribute that can accept various values.  For example, in HTML4 you have …

<input type=”text”>

for a textbox.  “text” is the value of the “type” attribute.

In HTML5, you have additional new values for the “type” attribute that was not in HTML4 previous.  They are …

type=”color”

type=”datetime”
type=”datetime-local”
type=”date”
type=”time”
type=”month”
type=”week”

type=”range”

type=”search”

type=”number”

type=”url”

See also new HTML5 input attributes and new HTML5 tags and discontinued HTML5 elements.