- Home
- /
- HTML Input Types
HTML Tutorial
INTRODUCTION
HTML BASIC TAGS
INLINE & BLOCK ELEMENTS
HTML LISTS
HTML TABLES
HTML FORMS
HEAD ELEMENTS
HTML MEDIA
MISCELLANEOUS TAGS
- Home
- /
- HTML Input Types
HTML Input Types
HTML inputs types are used to collect different kinds of user data in forms. Each type servers a specific role- from typing text to uploading files or selecting dates.
Text Input
Used for single-line text field like names or usernames.
- type=”text” create a standard text box.
- placeholder gives a hint inside the box.
Password Input
Used to securely entire passwords. The input characters are hidden.
Radio Buttons
Allow the user to choose only one option from a group.
- All radio buttons with the same name are grouped together.
- Only one can be selected at a time.
Checkbox
Allows the user to select multiple options.
Other Common Input Types
Here’s quick overview of additional inputs type you may encounter:
Input Type | Purpose |
---|---|
submit | Button to submit the form |
reset | Resets all form inputs to default values |
button | A general button (requires JavaScript) |
email | Validates email address input |
file | Uploads one or more files |
hidden | Sends invisible data to the server |
date | Selects a date |
time | Selects time only |
datetime-local | Selects both date and time |
color | Opens a color picker |
url | Accepts a website URL |
number | Input limited to numbers |
range | Slider for numeric range |
tel | Accepts a telephone number |
search | Search field with a clear (X) icon |
month | Selects month and year |
week | Selects a specific week |
image | Submits form using an image as a button |
Conclusion
Understanding input types helps you create smart and user-friendly forms. Each type is built to collect a specific kind of data, improving user experience and form reliability.