Changes in HTML 5 - <input> Tag
What's new in HTML 5
New input types:
- <input type="color" .../>
- <input type="date" .../>
- <input type="datetime" .../>
- <input type="datetime-local" .../>
- <input type="email" .../>
- <input type="month" .../>
- <input type="number" .../>
- <input type="range" .../>
- <input type="search" .../>
- <input type="tel" .../>
- <input type="time" .../>
- <input type="url" .../>
- <input type="week" .../>
A new set of attributes have been added which can be used to override various attributes on the <form> tag.
<input> attribute | overrides <form> |
---|---|
formaction | action |
formenctype | enctype |
formmethod | method |
formnovalidate | novalidate |
formtarget | target |
In addition, the autocomplete="autocomplete", autofocus="autofocus", form, list, max, min, multiple="multiple", pattern, placeholder, required="required" and step attributes have been added.
Differences between HTML 5 and earlier versions of HTML
The following attributes should not be coded on the <input> tag because they either have been deprecated or were never officially supported:
align
ismap
- use the <img> tag and itsismap
attribute insteadusemap
- use the <img> tag and itsusemap
attribute insteadvalign
The 2000-2010 Recommendations from the W3C HTML Working Group defined the HTML namespace for the input element type name along with the names of all HTML element types. In older (pre-2000) versions of HTML, element type names were not associated with a namespace.