-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquiz-civics.html
345 lines (327 loc) · 15.6 KB
/
quiz-civics.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
<!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>Civics</title>
</head>
<body>
<div class="top-container">
<div class="video-container">
<video autoplay muted loop>
<source src="civics-video.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
<h1 class="head" style="padding: 5px;">CIVICS</h1>
<p style="font-size: 28px; margin: 38px;" class="intr">Welcome to our Civics Quiz Page!</p>
<span style="font-size: 21px; padding: 8px; margin: 20px;" class="des">
Are you ready to test your knowledge of government, politics, and citizenship? Whether you're a budding political enthusiast or just curious about how societies are governed, this quiz is designed to challenge and educate you.
From understanding the structure of government to exploring the rights and responsibilities of citizens, our quiz covers a wide range of topics in civics and government. Get ready to dive into the principles of democracy, the workings of the legal system, and the dynamics of civic engagement.
So, grab your thinking cap and let's explore the fundamental principles that shape our societies and governments. Are you ready to become a civics expert? Let's find out!
</span>
<h4 style="font-size: 28px; margin: 8px;" class="start">Let's Start</h4>
<div class="box">
<div class="questions">
<ol>
<li>
<strong>Indian Constitution:</strong><br>
Who is known as the father of the Indian Constitution?<br>
<br><input type="radio" name="q1" value="a">Mahatma Gandhi
<br><input type="radio" name="q1" value="b">Jawaharlal Nehru
<br><input type="radio" name="q1" value="c">Dr. B.R. Ambedkar
<br><input type="radio" name="q1" value="d">Sardar Vallabhbhai Patel<br>
</li>
<br>
<li>
<strong>Fundamental Rights:</strong><br>
Which of the following is not a Fundamental Right guaranteed by the Indian Constitution?<br>
<br><input type="radio" name="q2" value="a">Right to Equality
<br><input type="radio" name="q2" value="b">Right to Property
<br><input type="radio" name="q2" value="c">Right to Freedom of Religion
<br><input type="radio" name="q2" value="d">Right to Constitutional Remedies<br>
</li>
<br>
<li>
<strong>Indian Parliament:</strong><br>
The Indian Parliament consists of how many houses?<br>
<br><input type="radio" name="q3" value="a">One
<br><input type="radio" name="q3" value="b">Two
<br><input type="radio" name="q3" value="c">Three
<br><input type="radio" name="q3" value="d">Four<br>
</li>
<br>
<li>
<strong>President of India:</strong><br>
Who was the first President of India?<br>
<br><input type="radio" name="q4" value="a">Dr. Rajendra Prasad
<br><input type="radio" name="q4" value="b">Dr. A.P.J. Abdul Kalam
<br><input type="radio" name="q4" value="c">Dr. Sarvepalli Radhakrishnan
<br><input type="radio" name="q4" value="d">Dr. Zakir Hussain
<br>
</li>
<br>
<li>
<strong>Elections:</strong><br>
What is the term of the Lok Sabha, the lower house of the Indian Parliament?<br>
<br><input type="radio" name="q5" value="a">4 years
<br><input type="radio" name="q5" value="b">5 years
<br><input type="radio" name="q5" value="c">6 years
<br><input type="radio" name="q5" value="d">7 years
<br>
</li>
<br>
<li>
<strong>Head Of Government:</strong><br>
Who is the head of the government in India?<br>
<br><input type="radio" name="q6" value="a">President
<br><input type="radio" name="q6" value="b">Prime Minister
<br><input type="radio" name="q6" value="c">Chief Justice
<br><input type="radio" name="q6" value="d">Speaker of the Lok Sabha
<br>
</li>
<br>
<li>
<strong>State Government:</strong><br>
Who is the head of the state government in India?<br>
<br><input type="radio" name="q7" value="a">Governor
<br><input type="radio" name="q7" value="b">Chief Minister
<br><input type="radio" name="q7" value="c">President
<br><input type="radio" name="q7" value="d">Prime Minister
<br>
</li>
<br>
<li>
<strong>Local Self-Government:</strong><br>
Which of the following is not a tier of the Panchayati Raj system in India?<br>
<br><input type="radio" name="q8" value="a">Gram Panchayat
<br><input type="radio" name="q8" value="b">Panchayat Samiti
<br><input type="radio" name="q8" value="c">Zila Parishad
<br><input type="radio" name="q8" value="d">Municipal Corporation
<br>
</li>
<br>
<li>
<strong>Constitutional Bodies:</strong><br>
Which body is responsible for the preparation of the annual budget of India?<br>
<br><input type="radio" name="q9" value="a">Election Commission
<br><input type="radio" name="q9" value="b">Finance Commission
<br><input type="radio" name="q9" value="c">Planning Commission
<br><input type="radio" name="q9" value="d">Public Service Commission<br>
</li>
<br>
<li>
<strong>Legal System:</strong><br>
Which of the following courts is the highest court of appeal in India?<br>
<br><input type="radio" name="q10" value="a">High Court
<br><input type="radio" name="q10" value="b">District Court
<br><input type="radio" name="q10" value="c">Supreme Court
<br><input type="radio" name="q10" value="d">Sessions Court<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 > Dr. B.R. Ambedkar
</li><br><br>
<li>2 > Right to Property</li><br><br>
<li>
3 > Two
</li><br><br>
<li>4 > Dr. Rajendra Prasad</li><br><br>
<li>
5 > Prime Minister
</li><br><br>
<li>6 > 5 years</li><br><br>
<li>7 > Chief Minister</li><br><br>
<li>8 > Municipal Corporation</li><br><br>
<li>9 > Finance Commission</li><br><br>
<li>10 > Supreme Court</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 == "b") {
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 == "5") {
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 == "b") {
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 == "b") {
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 == "d") {
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 == "c") {
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("Please Select An Option For Question 10");
}
if (score<4) {
document.querySelector(".fres").innerHTML=`YOUR SCORE IS ${score} 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} 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} 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>