-
Notifications
You must be signed in to change notification settings - Fork 0
/
form.html
106 lines (98 loc) · 3.08 KB
/
form.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Student Registration Form</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
box-sizing: border-box;
}
h2 {
text-align: center;
margin-top: 20px;
}
form {
width: 50%;
margin: 0 auto;
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
label {
font-weight: bold;
}
input[type="text"],
input[type="date"],
input[type="email"],
input[type="tel"],
textarea,
select {
width: 100%;
padding: 8px;
margin: 5px 0;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
input[type="radio"] {
margin-right: 5px;
}
button {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
width: 100%;
font-size: 16px;
}
button:hover {
background-color: #45a049;
}
button[type="submit"] {
background-color: #ff2222;
}
button[type="submit"]:hover {
background-color: #ff0000;
}
button[type="button"] {
background-color: #ccc;
}
button[type="button"]:hover {
background-color: #b3b3b3;
}
</style>
</head>
<body>
<h2>Student Registration Form</h2>
<form action="submit.html" method="post">
<label for="name">Name:</label><br>
<input type="text" id="name" name="name" required><br><br>
<label for="dob">Date of Birth:</label><br>
<input type="date" id="dob" name="dob" required><br><br>
<label>Gender:</label><br>
<input type="radio" id="male" name="gender" value="male" required>
<label for="male">Male</label>
<input type="radio" id="female" name="gender" value="female" required>
<label for="female">Female</label><br><br>
<label for="address">Address:</label><br>
<textarea id="address" name="address" rows="4" cols="50" required></textarea><br><br>
<label for="telephone">Telephone:</label><br>
<input type="tel" id="telephone" name="telephone" pattern="[0-9]{10}" required><br><br>
<label for="email">Email Address:</label><br>
<input type="email" id="email" name="email" required><br><br>
<label for="course">Course:</label><br>
<input type="text" id="course" name="course" required><br><br>
<button type="submit">Register</button>
<button type="button">Cancel</button>
</form>
</body>
</html>