01 · Introduction
One element, twenty-two behaviors
The <input> element is the workhorse of HTML forms — a single element whose behavior, appearance and validation rules are entirely determined by its type attribute.
Before HTML5, developers relied on type="text" plus JavaScript to fake everything else: e-mail checks, date pickers, sliders. HTML5 moved those responsibilities into the browser itself, giving every device a native, accessible, and often mobile-optimized control for free.
Picking the right type is not a cosmetic choice. It changes the keyboard shown on mobile, the validation the browser performs before your JavaScript ever runs, and what assistive technology tells a screen-reader user about the field.