HTML Input Types
What are Input Types?
HTML input types define different kinds of user input fields.
Example
<input type="text" placeholder="Text"><br><br> <input type="password" placeholder="Password"><br><br> <input type="email" placeholder="Email"><br><br> <input type="number" placeholder="Number"><br><br> <input type="date"><br><br> <input type="file"><br><br> <input type="checkbox"> I agree<br><br> <input type="radio" name="gender"> Male <input type="radio" name="gender"> Female<br><br> <input type="color"><br><br> <input type="range"><br><br> <input type="submit" value="Submit">
text
Single line input
password
Hidden text input
Email validation input
Live Preview
Summary
- Input types define data type
- Used inside forms
- Examples: text, email, password, file