HTML5 Input Attributes & Browser Support
Posted By Estelle Weyl on June 27, 2010
I have updated the HTML5 Web Form Browser support grid to include the various input attributes, for what input type each is relevant, and which browsers support each attribute for each type.
| TYPE ⇒
Attribute |
Text, search, url, tel | Password | Dateandtime Date, Month, Week, Time |
Dateandtime-local, number |
range | color | Checkbox, radio | file | |
|---|---|---|---|---|---|---|---|---|---|
| accept | WK, O, FF, IE |
||||||||
| autocomplete | O | O | O | O | O | O | O | ||
| autofocus | WK, O | WK, O | WK,O | WK, O | WK, O | WK, O | WK, O | WK, O | |
| checked | WK, O, FF, IE |
||||||||
| disabled | WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
| Form | O | O | O | O | O | O | O | O | |
| list | WK, O | WK, O | WK, O | WK, O | WK, O | WK, O | |||
| max | O, WK | O, WK | O, WK | ||||||
| maxlength | WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
||||||
| min | O, WK | O, WK | O, WK | ||||||
| multiple | FF, WK, IE | FF, WK | |||||||
| Name | WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE | WK, O, FF, IE |
WK, O, FF, IE |
| pattern | WK, O | WK, O | WK, O | ||||||
| placeholder | WK | WK | WK | ||||||
| readonly | WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
||||
| required | WK, O | WK, O | WK, O | WK, O | WK, O | WK, O | WK, O | ||
| size | WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
||||||
| step | O, WK | O, WK | O, WK | ||||||
| checked | WK, O, FF, IE |
||||||||
| value | WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE |
WK, O, FF, IE | WK, O, FF, IE |
WK, O, FF, IE |
- WK = Webkit (tested Safari 5)
- O = Opera (10.5 on Mac)
- FF = Firefox (3.6.3 on Mac)
- IE = Internet Explorer (IE8 on XP)
Browsers that don’t support the type attribute may still support other attributes in the input as the browser may support attributes on the text input type (such as maxlength or size), and will therefore support those attributes on a type it doesn’t support, as the input will default to text type. For example, while IE and FF don’t currently support the email type, they do support the multiple attribute on that type, since they will accept a text type including space separated email addresses.
Resources for this effort include:
- W3C input overview by Michael Smith
- Sandbox of all input types by Estelle Weyl
- Examples of the input types by Estelle Weyl
- JavaScript checking by type by Mike Taylor