HTML Input Types Reference
Complete guide to all 23 HTML5 input types with interactive examples, browser support information, and detailed documentation for modern web development.
🚀 Quick Navigation
📊 Input Types Overview
🔤 Text-based Inputs
Essential input types for collecting text and specialized text data from users.
text
Standard single-line text input. The most basic and widely used input type.
password
Masked text input for sensitive information like passwords.
Email address input with built-in validation and mobile keyboard optimization.
url
URL input with validation for web addresses and mobile keyboard optimization.
tel
Telephone number input optimized for mobile numeric keyboards.
search
Search input with enhanced UX features like clear button and search suggestions.
🔢 Number Inputs
Specialized inputs for numeric data with built-in validation and controls.
number
Numeric input with spinner controls and built-in validation.
range
Slider control for selecting values within a range.
📅 Date & Time Inputs
Specialized inputs for date and time selection with native picker support.
date
Date picker with native calendar interface in supported browsers.
time
Time picker with hour and minute selection.
datetime-local
Combined date and time picker without timezone.
month
Month and year picker for date ranges.
week
Week picker showing week number and year.
☑️ Selection Inputs
Inputs for selecting options from predefined choices.
checkbox
Boolean input for yes/no choices and multiple selections.
radio
Single selection from a group of mutually exclusive options.
📁 File Upload
Input for uploading files with format and size restrictions.
file
File upload input with format restrictions and multiple file support.
🎨 Color & Visual
Inputs for color selection and visual elements.
color
Color picker with native color selection interface.
🔘 Button Inputs
Button-type inputs for form actions and interactions.
submit
Submit button that triggers form submission.
reset
Reset button that clears all form fields to default values.
button
Generic button for custom JavaScript actions.
image
Image-based submit button with coordinate data.
🌐 Browser Support Matrix
Comprehensive browser support information for all HTML5 input types.
💡 Best Practices
Choose the Right Type
- Use semantic input types for better UX
- Email type shows @ keyboard on mobile
- Number type prevents non-numeric input
- Date types provide native pickers
Mobile Optimization
- Input types trigger appropriate keyboards
- Use tel for phone numbers
- URL type shows .com key
- Test on actual devices
Accessibility
- Always provide labels
- Use fieldset for radio groups
- Add helpful error messages
- Test with screen readers
Progressive Enhancement
- Provide fallbacks for older browsers
- Use feature detection
- Enhance with JavaScript when needed
- Test across browser versions