Live Demo
Firefox | Safari | Safari | Chrome | Opera | IE | Android |
|---|---|---|---|---|---|---|
The Low Down
The type attribute defines which type of input control to display and, depending on which type is included, provides for some validation in supporting browsers.
- The default type is
text, displaying a single-line text field, if the type is set totextor if the attribute is not specified. - Other values include:
button, displaying a button with no default behavior.checkbox, which displays a check box.colorprovides a control for specifying a 6-digit hexadecimal color,dateprovide a GUI for entering a date with year, month, and day, but no time).datetimeis similar to date, but also provides for entering a time based on UTC time zone,datetime-localis like datetime, but with no time zone.emailprovides a single line text field for editing an e-mail address accepting a single valid e-mail address or multiple comma separated email addresses is the multiple attribute is present, providing an email friendly keyboard on devices that have dynamic touch keyboards,fileprovides a control that lets the user select one or more files, including capturing audio, images and video,hiddenis control that is not displayed to the user, providing a way of submitting hidden name/value pairs to the server.imageallows the developer to create a graphical button with jpegs, pngs, svg or gifs,monthprovides control for selecting a numeric month and year,numberprovides a control for entering a number, with a spinner number selector in some browsers, and a numeric keyboard on devices that have dynamic touch keyboards,.passwordprovides for a single-line text field whose value is obscured,radiocreates a radio button of which only one in a same value named radio button group can be selected at a time,rangeis for imprecise number-input, providing a slider control,resetdisplays as a button that resets the contents of a form to its default values.searchprovides a single-line text field for entering search strings, that sometimes has rounded corners and/or a control within the text box to delete the contents,submitdisplay a button that submits the form.telprovides a single line control and a telephone keypad on devices that have dynamic keyboards,timeprovides a control for entering a time value with no time zone,urlprovides a text field requiring a protocol and displaying and an URL friendly keyboard on devices that have dynamic touch keyboards,weekprovides a control for entering a week number and year with no time zone.