Form Controls: input types select textarea
Use text, email, number, date, checkbox, radio, range, file, and color inputs alongside select and textarea elements.
The Full Palette of Input Types
HTML5 introduced many specialised input types beyond text. Each tells the browser what kind of data to expect, enabling native validation, appropriate keyboards on mobile, and platform-native UI controls.
Text, Search, and URL Inputs
type="text" is the plain text fallback. type="search" hints a search-optimised keyboard and often shows a clear button. type="url" validates URL format and shows a URL keyboard on mobile.
<input type="text" placeholder="Full name">
<input type="search" placeholder="Search...">
<input type="url" placeholder="https://example.com">All lessons in this course
- Form Controls: input types select textarea
- ARIA and Accessibility: label role aria-*
- Semantic HTML5: semantic vs div soup
- Form Validation Attributes