HTML Input Types
This chapter describes the different types for the HTML <input> element.
HTML Input Types
Here are the different input types you can use in HTML:
<input type="button"><input type="checkbox"><input type="color"><input type="date"><input type="datetime-local"><input type="email"><input type="file"><input type="hidden"><input type="image"><input type="month"><input type="number"><input type="password"><input type="radio"><input type="range"><input type="reset"><input type="search"><input type="submit"><input type="tel"><input type="text"><input type="time"><input type="url"><input type="week">
Input Type Text
`<input type="text">` defines a single-line text input field:
Text Input Example
Result
Input Type Password
`<input type="password">` defines a password field. The characters in a password field are masked (shown as asterisks or circles):
Password Input Example
Result
Input Type Radio
`<input type="radio">` defines a radio button. Radio buttons let a user select ONLY ONE of a limited number of choices:
Radio Button Example
Result
Input Type Checkbox
`<input type="checkbox">` defines a checkbox. Checkboxes let a user select ZERO or MORE options of a limited number of choices:
Checkbox Example
Result