-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquiz-chem.html
350 lines (329 loc) · 16 KB
/
quiz-chem.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
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="common-sub.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap" rel="stylesheet">
<title>Chemistry</title>
</head>
<body>
<div class="top-container">
<div class="video-container">
<video autoplay muted loop>
<source src="chemistry-video.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
<h1 class="head" style="padding: 5px;">CHEMISTRY</h1>
<p style="font-size: 28px; margin: 38px;" class="intr">Welcome to the Chemistry Quiz Page!</p>
<span style="font-size: 21px; padding: 8px; margin: 20px;" class="des">
Prepare to embark on a journey through the fascinating world of chemistry. Whether you're a seasoned chemist or just starting your exploration of the periodic table, this quiz page offers an exciting opportunity to test your knowledge and learn something new along the way.
From the basic building blocks of matter to complex chemical reactions, our quizzes cover a wide range of topics, ensuring there's something for everyone. Challenge yourself with questions on atomic structure, chemical bonding, organic chemistry, and more.
Whether you're here to brush up on your chemistry skills or simply enjoy the thrill of solving scientific puzzles, we're thrilled to have you join us. So grab your periodic table, put on your safety goggles, and let's dive into the wonderful world of chemistry together!
Get ready to ignite your curiosity and discover the magic of chemistry with our engaging quizzes. Good luck, and may the elements be ever in your favor!
</span>
<h4 style="font-size: 28px; margin: 8px;" class="start">Let's Start</h4>
<div class="box">
<div class="questions">
<ol>
<li>
<strong>Atomic Structure:</strong><br>
What subatomic particle is responsible for the mass of an atom?<br>
<br><input type="radio" name="q1" value="a">Proton
<br><input type="radio" name="q1" value="b">Electron
<br><input type="radio" name="q1" value="c">Neutron
<br><input type="radio" name="q1" value="d">Isotope<br>
</li>
<br>
<li>
<strong>Periodic Table:</strong><br>
Which element is located in Group 17 and Period 3 of the periodic table?<br>
<br><input type="radio" name="q2" value="a">Oxygen (O)
<br><input type="radio" name="q2" value="b">Chlorine (Cl)
<br><input type="radio" name="q2" value="c">Sodium (Na)
<br><input type="radio" name="q2" value="d">Magnesium (Mg)
<br>
</li>
<br>
<li>
<strong>Chemical Bonding:</strong><br>
Which type of bond is formed by the transfer of electrons between atoms?<br>
<br><input type="radio" name="q3" value="a">Covalent bond
<br><input type="radio" name="q3" value="b">Metallic bond
<br><input type="radio" name="q3" value="c">Ionic bond
<br><input type="radio" name="q3" value="d">Hydrogen bond<br>
</li>
<br>
<li>
<strong>States of Matter:</strong><br>
In which state of matter do particles have the least kinetic energy?<br>
<br><input type="radio" name="q4" value="a">Solid
<br><input type="radio" name="q4" value="b">Liquid
<br><input type="radio" name="q4" value="c">Gas
<br><input type="radio" name="q4" value="d">Plasma
<br>
</li>
<br>
<li>
<strong>Chemical Reactions:</strong><br>
What type of reaction is represented by the following equation: A + B → AB?<br>
<br><input type="radio" name="q5" value="a">Decomposition reaction
<br><input type="radio" name="q5" value="b">Combustion reaction
<br><input type="radio" name="q5" value="c">Synthesis reaction
<br><input type="radio" name="q5" value="d">DensitSingle displacement reaction<br>
</li>
<br>
<li>
<strong>Acids and Bases:</strong><br>
Which of the following substances is a strong acid?<br>
<br><input type="radio" name="q6" value="a">Vinegar (acetic acid)
<br><input type="radio" name="q6" value="b">Lemon juice (citric acid)
<br><input type="radio" name="q6" value="c">Hydrochloric acid (HCl)
<br><input type="radio" name="q6" value="d">Milk (lactic acid)
<br>
</li>
<br>
<li>
<strong>Chemical Equilibrium:</strong><br>
What happens to the equilibrium constant (Kc) when the concentration of reactants is increased?<br>
<br><input type="radio" name="q7" value="a">Kc decreases
<br><input type="radio" name="q7" value="b">Kc increases <br><input type="radio" name="q7" value="c">Kc remains the same
<br><input type="radio" name="q7" value="d">Kc becomes zero
<br>
</li>
<br>
<li>
<strong>Thermodynamics:</strong><br>
What is the enthalpy change (∆H) for an exothermic reaction?<br>
<br><input type="radio" name="q8" value="a">Positive
<br><input type="radio" name="q8" value="b">Negative
<br><input type="radio" name="q8" value="c">Zero
<br><input type="radio" name="q8" value="d">Indeterminate
<br>
</li>
<br>
<li>
<strong>Organic Chemistry:</strong><br>
Which functional group is present in alcohols?<br>
<br><input type="radio" name="q9" value="a">Carbonyl
<br><input type="radio" name="q9" value="b">Hydroxyl
<br><input type="radio" name="q9" value="c">Aldehyde
<br><input type="radio" name="q9" value="d">Ester<br>
</li>
<br>
<li>
<strong>Biochemistry:</strong><br>
What is the primary function of enzymes in biological systems?<br>
<br><input type="radio" name="q10" value="a">To speed up chemical reactions
<br><input type="radio" name="q10" value="b">To store energy
<br><input type="radio" name="q10" value="c">To provide structural support
<br><input type="radio" name="q10" value="d">To regulate body temperature
<br>
</li>
<br>
</ol>
<button class="sbut">Submit</button>
<div class="result">
<h3>Congratulaions For Completing The Quiz</h3>
<br /><br />
<p>Correct Options Are :</p>
<br /><br />
<div class="correct-options">
<ul>
<li>
1 > Neutron
</li><br><br>
<li>2 > Chlorine (Cl)</li><br><br>
<li>
3 > Ionic bond
</li><br><br>
<li>4 > Solid</li><br><br>
<li>
5 > Synthesis reaction
</li><br><br>
<li>6 > Hydrochloric acid (HCl)</li><br><br>
<li>7 > Kc remains the same
</li><br><br>
<li>8 > Negative</li><br><br>
<li>9 > Hydroxyl</li><br><br>
<li>10 > To speed up chemical reactions</li><br><br><br><br>
</ul>
<div class="fres">
</div>
</div>
</div>
</div>
</div>
<script src="common-sub.js"></script>
<script>
var score = 0;
document.querySelector(".sbut").addEventListener("click", function (event) {
event.preventDefault();
document.querySelector(".sbut").innerHTML="Result Below"
document.querySelector(".sbut").style.height='60px'
document.querySelector(".sbut").style.width='90px'
document.querySelector(".result").style.opacity='1'
var q1 = document.querySelector('input[name="q1"]:checked');
if (q1) {
if (q1.value == "c") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[0].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[0].style.color='red'
}
} else {
alert("Please Select An Option For Question 1");
}
var q2 = document.querySelector('input[name="q2"]:checked');
if (q2) {
if (q2.value == "b") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[3].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[3].style.color='red'
}
} else {
alert("Please Select An Option For Question 2");
}
var q3 = document.querySelector('input[name="q3"]:checked');
if (q3) {
if (q3.value == "c") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[6].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[6].style.color='red'
}
} else {
alert("Please Select An Option For Question 3");
}
var q4 = document.querySelector('input[name="q4"]:checked');
if (q4) {
if (q4.value == "a") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[9].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[9].style.color='red'
}
} else {
alert("Please Select An Option For Question 4");
}
var q5 = document.querySelector('input[name="q5"]:checked');
if (q5) {
if (q5.value == "d") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[12].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[12].style.color='red'
}
} else {
alert("Please Select An Option For Question 5");
}
var q6 = document.querySelector('input[name="q6"]:checked');
if (q6) {
if (q6.value == "c") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[15].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[15].style.color='red'
}
} else {
alert("Please Select An Option For Question 6");
}
var q7 = document.querySelector('input[name="q7"]:checked');
if (q7) {
if (q7.value == "c") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[18].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[18].style.color='red'
}
} else {
alert("Please Select An Option For Question 7");
}
var q8 = document.querySelector('input[name="q8"]:checked');
if (q8) {
if (q8.value == "b") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[21].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[21].style.color='red'
}
} else {
alert("Please Select An Option For Question 8");
}
var q9 = document.querySelector('input[name="q9"]:checked');
if (q9) {
if (q9.value == "b") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[24].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[24].style.color='red'
}
} else {
alert("Please Select An Option For Question 9");
}
var q10 = document.querySelector('input[name="q10"]:checked');
if (q10) {
if (q10.value == "a") {
console.log("Correct");
document.querySelector(".correct-options").firstElementChild.children[27].style.color='green'
score++;
}
else{
document.querySelector(".correct-options").firstElementChild.children[27].style.color='red'
}
} else {
alert("You Had Not Selected Any Option For Question 10");
}
if (score<4) {
document.querySelector(".fres").innerHTML=`YOUR SCORE IS ${score} OUT OF 10<br>TRY BETTER NEXT TIME`;
document.querySelector(".fres").addEventListener("mouseover",function(){
document.querySelector(".fres").style.backgroundColor='red'
})
document.querySelector(".fres").addEventListener("mouseout",function(){
document.querySelector(".fres").style.backgroundColor='aquamarine'
})
}
else if (score>3 && score<9){
document.querySelector(".fres").innerHTML=`YOUR SCORE IS ${score} OUT OF 10<br>YOU HAD DONE NICE`;
document.querySelector(".fres").addEventListener("mouseover",function(){
document.querySelector(".fres").style.backgroundColor='cornflowerblue'
})
document.querySelector(".fres").addEventListener("mouseout",function(){
document.querySelector(".fres").style.backgroundColor='aquamarine'
})
}
else{
document.querySelector(".fres").innerHTML=`YOUR SCORE IS ${score} OUT OF 10<br>YOU HAD DONE EXCELLENT`;
document.querySelector(".fres").addEventListener("mouseover",function(){
document.querySelector(".fres").style.backgroundColor='greenyellow'
})
document.querySelector(".fres").addEventListener("mouseout",function(){
document.querySelector(".fres").style.backgroundColor='aquamarine'
})
}
});
</script>
</body>
</html>