References

Collection of references for web development.

HTML type (input) attribute

Description

Specifies the type of the input control.

Values

Value
button
checkbox
color
date
datetime-local
email
file
hidden
image
month
number
password
radio
range
reset
search
submit
tel
text
time
url
week

Example

<form>
	<input type="text" name="username" placeholder="Your Name">
</form>

Example #2

<form>
	<p>Please select your gender:</p>
    <input type="radio" id="choice1" name="gender" value="male">
    <label for="choice1">Male</label>
    <input type="radio" id="choice2" name="gender" value="female">
    <label for="choice2">Female</label>
	<br><br>
	<button type="submit">Submit</button>
</form>