html input type list
Type | Example | Result |
---|---|---|
button | <input type="button"> | |
checkbox | <input type="checkbox"> | |
color | <input type="color"> | |
date | <input type="date"> | |
datetime | <input type="datetime"> | |
datetime-local | <input type="datetime-local"> | |
<input type="email"> | ||
file | <input type="file"> | |
hidden | <input type="hidden"> | |
image | <input type="image"> | |
number | <input type="number"> | |
password | <input type="password"> | |
radio | <input type="radio"> | |
range | <input type="range"> | |
reset | <input type="reset"> | |
search | <input type="search"> | |
submit | <input type="submit"> | |
tel | <input type="tel"> | |
text | <input type="text"> | |
time | <input type="time"> | |
url | <input type="url"> | |
week | <input type="week"> |
Example of input tag :
<!DOCTYPE html>
<html lang="en">
<head>
<title>Input type list</title>
</head>
<body>
button <input type="button"><br>
checkbox <input type="checkbox"><br>
color <input type="color"><br>
date <input type="date"><br>
datetime <input type="datetime"><br>
datetime-local <input type="datetime-local"><br>
email <input type="email"><br>
file <input type="file"><br>
hidden <input type="hidden"><br>
image <input type="image"><br>
month <input type="month"><br>
number <input type="number"><br>
password <input type="password"><br>
radio <input type="radio"><br>
range <input type="range"><br>
reset <input type="reset"><br>
search <input type="search"><br>
submit <input type="submit"><br>
tel <input type="tel"><br>
text <input type="text"><br>
time <input type="time"><br>
url <input type="url"><br>
week <input type="week"><br>
</body>
</html>
Code details :
<input type = "button"> This is what makes a button.
<input type = "checkbox"> This creates a checkbox.
<input type = "color"> It selects color.
<input type = "date"> This is used to create a date.
<input type = "datetime"> This creates the datetime field.
<input type = "datetime-local"> This creates datetime-local.
<input type = "email"> This creates an email field.
<input type = "file"> This creates a file upload button.
<input type = "hidden"> This creates a hidden field.
<input type = "image"> This is how the image is created.
<input type = "month"> This is used to create a month.
<input type = "number"> This creates a number field.
<input type = "number"> This is how numbers are created.
<input type = "radio"> This is what radio is made of.
<input type = "range"> This creates range.
<input type = "reset"> This gives the reset button.
<input type = "search"> This creates a search button.
<input type = "submit"> This creates a submit button.
<input type = "tel"> It is used to field perpendicular text.
<input type = "text"> This is the text field.
<input type = "time"> This creates a time button.
<input type = "url"> This creates the url field of the web page.
<input type = "week"> This is used to create the week button.