HTML <input> Tag
The <input>
tag indicates a space where users can type information.
The <input>
element is a crucial part of forms.
The <input>
element can appear in different ways based on its type attribute.
Here are the various types of input:
<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">
(default value)<input type="time">
<input type="url">
<input type="week">
Tips and Notes
Tip: Use the <label> tag whenever you want to create labels for different input elements like text boxes (<input type="text">
), checkboxes (<input type="checkbox">
), radio buttons (<input type="radio">
), file upload inputs (<input type="file">
), and password inputs (<input type="password">
).