-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
140 lines (128 loc) · 4 KB
/
Copy pathindex.html
File metadata and controls
140 lines (128 loc) · 4 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html lang="utf-8">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Basic Form Page</title>
<!-- linking to styling sheet -->
<link rel="stylesheet" href="style.css" />
</head>
<body>
<main class="container">
<h1>Basic Form Details</h1>
<p class="hint">Please fill all details.It will be validated.</p>
<form id="scoreForm" novalidate>
<!-- Name -->
<div class="form-row">
<label for="name">Name</label>
<input
id="name"
name="name"
type="text"
placeholder="Your full name"
required
/>
</div>
<!-- Age -->
<div class="form-row">
<label for="age">Age</label>
<input
id="age"
name="age"
type="number"
min="5"
max="100"
step="1"
placeholder="enter"
required
/>
</div>
<!-- Gender-->
<fieldset class="form-row">
<legend>Gender</legend>
<label
><input type="radio" name="gender" value="Male" required />
Male</label
>
<label
><input type="radio" name="gender" value="Female" /> Female</label
>
<label
><input type="radio" name="gender" value="Other" /> Other</label
>
</fieldset>
<!-- Country -->
<div class="form-row">
<label for="country">Country</label>
<select id="country" name="country" required>
<option value="">Select country</option>
<option value="India">India</option>
<option value="USA">USA</option>
<option value="Japan">Japan</option>
<option value="China">China</option>
</select>
</div>
<!-- Technological stack -->
<fieldset class="form-row">
<legend>Technological stack (choose any)</legend>
<label><input type="checkbox" name="tech" value="HTML" /> HTML</label>
<label><input type="checkbox" name="tech" value="CSS" /> CSS</label>
<label><input type="checkbox" name="tech" value="JS" /> JS</label>
<label
><input type="checkbox" name="tech" value="React" /> React</label
>
<label
><input type="checkbox" name="tech" value="React Native" /> React
Native</label
>
</fieldset>
<!-- Address -->
<div class="form-row">
<label for="address">Address</label>
<textarea
id="address"
name="address"
rows="4"
placeholder="Please provide your complete address"
required
></textarea>
</div>
<!-- Phone number-->
<div class="form-row">
<label for="telephone">Telephone</label>
<input
id="telephone"
name="telephone"
type="tel"
placeholder="enter your phone number"
inputmode="numeric"
pattern="^\+?[0-9\s\-]{7,15}$"
required
/>
</div>
<!-- Email -->
<div class="form-row">
<label for="email">Email</label>
<input
id="email"
name="email"
type="email"
placeholder="you@example.com"
required
/>
</div>
<!-- Buttons -->
<div class="form-actions">
<button type="reset" id="resetBtn">Reset</button>
<button type="submit" id="submitBtn">Submit</button>
</div>
</form>
<!-- validation messages(passed or failed) will be shown-->
<div id="messages" aria-live="polite"></div>
<!-- table display-->
<section id="result" aria-live="polite"></section>
</main>
<script src="render_table.js"></script>
<script src="validation.js"></script>
</body>
</html>