Home >> HTML 5 >> input Tag in HTML 5

input Tag in HTML 5

The <input> tag is used within the <form> element and defines fields for user input. 
The type of the field (text, checkbox, radio button, password field, etc.) is determined by the value of the type attribute. 
Attributes: 
1)-button
2)-checkbox
3)-color
4)-date
5)-datetime-local
6)-email
7)-file
8)-hidden
9)-image
10)-month
11)-number
12)-password
13)-radio
14)-range
15)-reset
16)-search
17)-submit
18)-tel
19)-text
20)-time
21)-url
22)-week

Syntax:
<input name="" type="" value="">

For example:-

<!DOCTYPE html>
<html>
<head>
   <title>Form Tag</title>
</head>
<body>
    <form name"register" action="" method="post">
         <legend>Personal Detail:</legend>
         <label for="name">Name:</label>
         <input type="text" id="name" name="name">
         <label for="email">Email:</label>
         <input type="email" id="email" name="email">
         <label for="mobile">Mobile No.:</label>
         <input type="text" id="mobile" name="mobile">
         <input type="submit" value="Submit">
    </form>
</body>
</html>

Post Your Comment

Next Questions
ins Tag
kbd Tag
label Tag
legend Tag
li Tag
link Tag
ul Tag
video Tag
wbr Tag

Copyright ©2022 coderraj.com. All Rights Reserved.