SyntaxStudy
Sign Up
HTML Beginner 1 min read

HTML Input Types

HTML Input Types

The type attribute changes how an input behaves and what the browser validates.

TypeDescription
textSingle-line text
emailEmail address (validated)
passwordHidden text entry
numberNumeric input with up/down arrows
dateDate picker
checkboxTrue/false toggle
radioOne choice from a group
fileFile upload
rangeSlider
colorColour picker
hiddenInvisible data field
submitSubmit button
Example
<input type="text"     placeholder="Enter text">
<input type="email"    placeholder="name@example.com">
<input type="password" placeholder="Password">
<input type="number"   min="1" max="100">
<input type="date">
<input type="color">
<input type="range"    min="0" max="100" value="50">
<input type="checkbox" id="agree">
<label for="agree">I agree</label>