type
The type attribute specifies the type of <input> element to display. The full list of types defined in HTML 5 is shown below. Not all types are supported by all browsers. To get the latest information on which browsers support what features, visit the Wufoo.com HTML 5 page.
Note: When using a type of "number" browsers will default the step property to 1 which may prevent the entry of fractional values. Make sure you also set the step property correctly.
Value |
Description |
button |
Defines a clickable button (mostly used with a JavaScript to activate a script) |
checkbox |
Defines a checkbox |
color |
Defines a color picker |
date |
Defines a date control (year, month and day (no time)) |
datetime |
Defines a date and time control (year, month, day, hour, minute, second, and fraction of a second, based on UTC time zone) |
datetime-local |
Defines a date and time control (year, month, day, hour, minute, second, and fraction of a second (no time zone) |
|
Defines a field for an e-mail address |
file |
Defines a file-select field and a "Browse..." button (for file uploads) |
hidden |
Defines a hidden input field |
image |
Defines an image as the submit button |
month |
Defines a month and year control (no time zone) |
number |
Defines a field for entering a number |
password |
Defines a password field (characters are masked) |
radio |
Defines a radio button |
range |
Defines a control for entering a number whose exact value is not important (like a slider control) |
reset |
Defines a reset button (resets all form values to default values) |
search |
Defines a text field for entering a search string |
submit |
Defines a submit button |
tel |
Defines a field for entering a telephone number |
text |
Default. Defines a single-line text field (default width is 20 characters) |
time |
Defines a control for entering a time (no time zone) |
url |
Defines a field for entering a URL |
week |
Defines a week and year control (no time zone) |
Default value
text
Valid values
A value from the table above.