New Input Types
In HTML 4.01, a handful of form elements allowed user input, including textarea, checkbox, and radio, but the most common was without a doubt input, most often with a type attribute value of text. This hard-working field (from here on known as the text input) was used in every situation in which a specialized control was unavailable: as a search box, for telephone numbers and email addresses … you name it, the text input did it, with only some client- or server-side validation to give meaning to the different types of data being provided by the user.
When work on HTML5 was underway, with its stated emphasis on standardizing common patterns of existing usage, creating new input types to lift some of the burden from the encumbered ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access