HTML INPUT TYPES
<input type=""> in HTML defines the kind of data an input field accepts. Common input types include:
| Type | Description |
|---|---|
text | Single-line text input |
password | Hidden text for passwords |
email | Email address input with validation |
number | Numeric input with up/down controls |
tel | Telephone number input |
url | Website URL input |
search | Search field |
date | Date picker |
time | Time picker |
datetime-local | Date and time picker |
month | Month and year picker |
week | Week picker |
color | Color picker |
range | Slider control |
checkbox | Check box |
radio | Radio button |
file | File upload |
hidden | Hidden field |
submit | Submit button |
reset | Reset button |
button | Generic button |
image | Image submit button |
Examples
<input type="text" placeholder="Enter your name">
<input type="email" placeholder="Enter your email">
<input type="password" placeholder="Enter password">
<input type="date">
<input type="checkbox"> I agree
<input type="submit" value="Submit">
If you need a complete list with browser support or validation attributes for each type, let me know.
Comments
Post a Comment