Input Types
HTML5 provides many input types. Using the right type improves usability, triggers appropriate keyboards on mobile, and enables browser validation.
Email and URL types provide free validation and show appropriate keyboards on mobile. Always use the most specific type available.
Key point: Right input type = free validation + better mobile UX
Number shows numeric keyboard and spinner controls. Tel shows phone keypad. Range for sliders. Use inputmode for more control over keyboard.
Key point: Use tel for phone numbers - number type doesn't allow formatting
Native date/time pickers vary by browser but work everywhere. They handle localization automatically. Consider custom pickers for consistent styling.
Key point: Native pickers are accessible but look different across browsers
Checkbox for multiple selections, radio for single selection from a group, select for dropdowns. Each has specific accessibility requirements.
Key point: Radio buttons need same 'name' attribute to work as a group