-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtml6.html
75 lines (60 loc) · 2.26 KB
/
html6.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Forms</title>
</head>
<body>
<!-- This is how we can create a form in html we have to add a action attribute so that if a information is submitted it is forwarded to that url or link. Div is a block element it takes entire line. We can use a shortcut input:then the element we want to take input from. We use ID attribute so as to use label tag in which we can make so that if a select a particular text then we will be taken to the tag input whose input ID id put in the for attribute of label -->
<h3>Form tutorial</h3>
<form action="lakshay.php">
<label for="name">Name</label>
<div>
:<input type="text" name="name" id="name">
</div>
<br>
<div>
Age:<input type="text" name="age">
</div>
<br>
<div>
Gender:<input type="text" name="Gender">
</div>
<br>
<div>
Email:<input type="email" name="EmailID">
</div><br>
<div>
<input type="date" name="Date">
</div><br><br>
<div>
<input type="number" name="Mynumber">
</div><br><br>
<label for="Eligbile">Are you eligible?</label>
<div>
<input type="checkbox" name="Eligibilty" id="Eligbile">
</div><br><br>
<div>
Gender: Male<input type="radio" name="Gendercheck"> Female<input type="radio" name="Gendercheck">
Other<input type="radio" name="Gendercheck">
</div><br><br>
<div>
Write something about urself:<br><textarea name="textarea" id="" cols="30" rows="10"></textarea>
</div>
<div><label for="mycar">Select your car</label>
<select name="Car" id="mycar">
<option value="Maruti">Maruti</option>
<option value="Toyota" selected>Toyota</option>
</select>
</div>
<div>
<input type="submit" value="Submit Form">
</div>
<div>
<input type="reset" value="Reset Form ">
</div>
</form>
</body>
</html>