Form Info Tables

Form Input Types

HTML5 Input TypeDescription
color Allows user to choose colors
date Allows the user to enter a date (without time zone) using a drop-down date-picker calendar
datetime Allows user to choose a date and a time with a GMT time zone
datetime-local Allows user to choose a date and a time with a local time zone
email Allows user to enter one or more email addresses
month Allows user to choose a date using the month and year (without time zone)
number Allows user to enter integer or float values
range Allows user to enter numbers using a slider control
search Allows user to enter text for a search query
tel Allows user to enter a phone number
time Allows user to enter a time (without time zone)
url Allows user to enter a URL, such as an http://, https://, ftp://, or mailto: address
week Allows user to choose a date using the week and year (without time zone)

HTML5 Global Attributes for Form Elements

AttributeDescription
autofocus Applies focus on the element when the page loads
disabled Disables the element
for Specifies the IDs of elements whose values were used
form Specifies the form(s) on the page in which the element appears
maxlength Specifies the maximum number of characters that can be entered in the field by the user