-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.html
90 lines (85 loc) · 2.71 KB
/
forms.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!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>
<h2>This is HTML forms tutorial</h2>
<form action="backend.php">
<div>
<!-- gives a label and also automatically shift ur cursor to the respective field you want to enter data in -->
<label for="name">Name:</label>
<!-- text box -->
<input type="text" id="name" name="myName">
</div>
<br>
<div>
<label for="role">Role:</label>
<input type="text" id="role" name="myRole">
</div>
<br>
<div>
<label for="email">Email:</label>
<!-- EMAIL -->
<input type="email" id="email" name="myEmail">
</div>
<br>
<div>
<label for="date">Date:</label>
<!-- DATE -->
<input type="date" id="date" name="myDate">
</div>
<br>
<div>
<label>Gender:</label>
<!-- radio buttons -->
<input type="radio" name="myGender">Male</input>
<input type="radio" name="myGender">Female</input>
</div>
<br>
<div>
<label for="no">Bonus:</label>
<!-- number input -->
<input id="no" type="number" name="myNumber">
</div>
<br>
<div>
<label>Skills:</label>
<!-- checkboxes -->
<input type="checkbox" name="mySkills">HTML5</input>
<input type="checkbox" name="mySkills">CSS</input>
<input type="checkbox" name="mySkills">Javascript</input>
</div>
<br>
<div>
<div>
<label for="your">Write about yourself:</label>
</div>
<div>
<textarea id="your" name="myText" cols="30" rows="10"></textarea>
</div>
</div>
<br>
<div>
<label for="car">Select car: </label>
<select name="Mycar" id="car">
<option>Mercedes</option>
<option selected>Ferrari</option>
<option>Lamborghini</option>
<option>Buggati</option>
<option>F1 race car</option>
</select>
</div>
<br>
<div>
<!-- submit button -->
<input type="submit" value="Submit now">
<!-- reset form -->
<input type="reset" value="Reset form">
</div>
</form>
</body>
</html>