Input types supported by Html - all types of input
HTML provides a variety of input types to allow users to input data in different formats. Below is a detailed explanation of all input types:
Text (type="text"
)
<input type="text" placeholder="Enter your name">
Password (type="password"
)
<input type="password" placeholder="Enter your password">
Email (type="email"
)
<input type="email" placeholder="Enter your email">
Number (type="number"
)
min
, max
, and step
attributes.<input type="number" min="1" max="100">
Tel (type="tel"
)
<input type="tel" placeholder="Enter your phone number">
URL (type="url"
)
<input type="url" placeholder="Enter website URL">
Date (type="date"
)
<input type="date">
Time (type="time"
)
<input type="time">
Color (type="color"
)
<input type="color">
Checkbox (type="checkbox"
)
<input type="checkbox" value="Agree">
Radio (type="radio"
)
Allows selection of a single option from a group.
Example:
<input type="radio" name="gender" value="Male"> Male
<input type="radio" name="gender" value="Female"> Female
File (type="file"
)
<input type="file">
Range (type="range"
)
<input type="range" min="0" max="10">
Search (type="search"
)
<input type="search" placeholder="Search...">
Hidden (type="hidden"
)
<input type="hidden" value="12345">
Button (type="button"
)
<input type="button" value="Click Me">
Submit (type="submit"
)
<input type="submit" value="Submit">
Reset (type="reset"
)
<input type="reset" value="Reset">
Month (type="month"
)
<input type="month">
Week (type="week"
)
<input type="week">
Datetime-Local (type="datetime-local"
)
<input type="datetime-local">
Image (type="image"
)
<input type="image" src="submit.png" alt="Submit">
CSS selectors and types.
*
)
{ margin: 0; padding: 0; }
p { color: blue; }
.classname
)
.box { border: 1px solid black; }
#id
)A, B
)>
)+
)~
)[attribute]
):pseudo-class
)::pseudo-element
)Types of CSS
JAVASCRIPT
PHP