Input Types
HTML5 introduced many input types that provide built-in validation and mobile-friendly keyboards.
Text Input Types
Loading HTML Playground...
Each type provides:
- Appropriate virtual keyboard on mobile
- Built-in validation for some types
Number Inputs
Loading HTML Playground...
Date and Time Inputs
Loading HTML Playground...
Date inputs:
- Show native date pickers
- Format varies by locale
minandmaxrestrict dates
Color and File
Loading HTML Playground...
File input attributes:
multiple- Allow multiple filesaccept- Restrict file types
Checkboxes
Loading HTML Playground...
Checkbox notes:
- Same
namefor related checkboxes checkedattribute pre-selects- Multiple can be selected
Radio Buttons
Loading HTML Playground...
Radio button notes:
- Same
namegroups radio buttons - Only one can be selected
checkedsets default
Hidden Inputs
Loading HTML Playground...
Exercise: Create a Survey Form
Create a survey with different input types:
Loading HTML Exercise...
Different input types provide appropriate interfaces and validation for each data type!

