-
Notifications
You must be signed in to change notification settings - Fork 0
/
Quiz.html
244 lines (219 loc) · 10.4 KB
/
Quiz.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
<!DOCTYPE html> <!-- Defines the document type as HTML5 -->
<html> <!-- Opens the html tag that marks the beginning of the HTML document -->
<head> <!-- Opens the head tag that contains metadata about the page -->
<!-- Meta tags: -->
<meta name="description" content="Page Description Here" /> <!-- This line specifies a description for the page, which may be used by search engines -->
<meta http-equiv="Content-Type" content="text/html"; charset="utf-8"/> <!-- This line specifies the character encoding for the HTML document -->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <!-- This line specifies how the page should be scaled on different devices -->
<title>Basic Geography Quiz</title> <!-- Defines the page title -->
<link rel="stylesheet" href="style.css"> <!-- This line links an external CSS file to style the HTML document -->
</head> <!-- Closes head tag -->
<body> <!-- Opens body tag that contains page content -->
<div class="wrapper">
<table width="100%" height="60" align="center" border="0" cellspacing="5" cellpadding="5" bgcolor="#000000">
<tr>
<td align="left">
<table width="550" border="0" align="center" cellspacing="5" cellpadding="5">
<tr>
<td width="100" align="center"><img src="earth.gif" width="60" height="60"></td>
<td width="100" align="center"><font face="Verdana, Geneva, sens-serif"><h2><a href="About.html" style="color: white;">About</a></h2></font></td>
<td width="100" align="center"><font face="Verdana, Geneva, sens-serif"><h2><a href="Learn.html" style="color: white;">Learn</a></h2></font></td>
<td width="100" align="center"><font face="Verdana, Geneva, sens-serif"><h2><a href="Exit.html" style="color: white;">Exit</a></h2></font></td>
<td width="100" align="center"><img src="butterfly.gif" width="90%" height="60"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div class="wrapper">
<img src="quiz.png" width="100%" height="80%">
</div>
<div class="wrapper">
<!-- Question 1 -->
<div class="wrapper">
<img src="question1.png" width="100%" height="80%">
<div class="question">What is the capital of France?</div><!-- Adds div element with "question" class that contains question text -->
<ul class="options"> <!-- Adds ul element with "options" class that contains answer options -->
<li><input type="radio" name="answer1" value="Paris">Paris</li> <!-- Adds li element that contains radio button and option text -->
<li><input type="radio" name="answer1" value="London">London</li> <!-- Adds another li element with radio button and option text -->
<li><input type="radio" name="answer1" value="Berlin">Berlin</li> <!-- Adds another li element with radio button and option text -->
</ul> <!-- Closes ul tag -->
</div>
<!-- Question 2 -->
<div class="wrapper">
<img src="question2.png" width="100%" height="80%">
<div class="question">What is the only country that borders the United Kingdom?</div>
<ul class="options">
<li><input type="radio" name="answer2" value="Ireland">Ireland</li>
<li><input type="radio" name="answer2" value="France">France</li>
<li><input type="radio" name="answer2" value="Sweden">Sweden</li>
</ul>
</div>
<!-- Question 3-->
<div class="wrapper">
<img src="question3.png" width="100%" height="80%">
<div class="question">What is the world’s largest island?</div>
<ul class="options">
<li><input type="radio" name="answer3" value="NewGuinea">New Guinea</li>
<li><input type="radio" name="answer3" value="Greenland">Greenland</li>
<li><input type="radio" name="answer3" value="Madagascar">Madagascar</li>
</ul>
</div>
<!-- Question 4 -->
<div class="wrapper">
<img src="question4.png" width="100%" height="80%">
<div class="question">What is the capital city of New Zealand?</div>
<ul class="options">
<li><input type="radio" name="answer4" value="Auckland">Auckland</li>
<li><input type="radio" name="answer4" value="Wellington">Wellington</li>
<li><input type="radio" name="answer4" value="Hamilton">Hamilton</li>
</ul>
</div>
<!-- Question 5-->
<div class="wrapper">
<img src="question5.png" width="100%" height="80%">
<div class="question">Which country has the longest total coastline in the world?</div>
<ul class="options">
<li><input type="radio" name="answer5" value="Canada">Canada</li>
<li><input type="radio" name="answer5" value="Egypt">Egypt</li>
<li><input type="radio" name="answer5" value="India">India</li>
</ul>
</div>
<!-- Question 6-->
<div class="wrapper">
<img src="question6.png" width="100%" height="80%">
<div class="question">How many main Time Zones are there in Australia?</div>
<ul class="options">
<li><input type="radio" name="answer6" value="2">2</li>
<li><input type="radio" name="answer6" value="5">5</li>
<li><input type="radio" name="answer6" value="3">3</li>
</ul>
</div>
<!-- Question 7-->
<div class="wrapper">
<img src="question7.png" width="100%" height="80%">
<div class="question">Where is the largest active volcano on Earth located?</div>
<ul class="options">
<li><input type="radio" name="answer7" value="Madagascar">Madagascar</li>
<li><input type="radio" name="answer7" value="China">China</li>
<li><input type="radio" name="answer7" value="Hawaii">Hawaii</li>
</ul>
</div>
<!-- Question 8-->
<div class="wrapper">
<img src="question8.png" width="100%" height="80%">
<div class="question">Ninety percent of the Earth’s population lives in which hemisphere?</div>
<tr><td align="center">
<ul class="options">
<li><input type="radio" name="answer8" value="TheSouthernHemisphere">The Southern Hemisphere</li>
<li><input type="radio" name="answer8" value="TheNorthernHemisphere">The Northern Hemisphere</li>
<li><input type="radio" name="answer8" value="TheEasternHemisphere">The Eastern Hemisphere</li>
</ul>
</div>
<!-- Question 9 -->
<div class="wrapper">
<img src="question9.png" width="100%" height="80%">
<div class="question">What is the largest island in the Mediterranean by both area and population?</div>
<ul class="options">
<li><input type="radio" name="answer9" value="Cyprus">Cyprus</li>
<li><input type="radio" name="answer9" value="Sicily">Sicily</li>
<li><input type="radio" name="answer9" value="Mallorca">Mallorca</li>
</ul>
</div>
<!-- Question 10-->
<div class="wrapper">
<img src="question10.png" width="100%" height="80%">
<div class="question">What is the capital city of Brazil?</div>
<ul class="options">
<li><input type="radio" name="answer10" value="SaoPaulo">Sao Paulo</li>
<li><input type="radio" name="answer10" value="RiodeJaneiro">Rio de Janeiro</li>
<li><input type="radio" name="answer10" value="Brasilia">Brasilia</li>
</ul>
</div>
<!-- Question 11-->
<div class="wrapper">
<img src="question11.png" width="100%" height="80%">
<div class="question">What is Japan's most famous volcano and highest mountain?</div>
<ul class="options">
<li><input type="radio" name="answer11" value="MountFuji">Mount Fuji</li>
<li><input type="radio" name="answer11" value="MountKita">Mount Kita</li>
<li><input type="radio" name="answer11" value="MountHotaka">Mount Hotaka</li>
</ul>
</div>
<!-- Question 12-->
<div class="wrapper">
<img src="question12.png" width="100%" height="80%">
<div class="question">What leaf is on the The National Flag of Canada?</div>
<ul class="options">
<li><input type="radio" name="answer12" value="FourLeafClover">Four Leaf Clover</li>
<li><input type="radio" name="answer12" value="MapleLeaf">Maple Leaf</li>
<li><input type="radio" name="answer12" value="PearLeaf">Pear Leaf</li>
</ul>
</div>
<!-- Question 13-->
<div class="wrapper">
<img src="question13.png" width="100%" height="80%">
<div class="question">Where is the world’s largest desert located?</div>
<ul class="options">
<li><input type="radio" name="answer13" value="Antarctica">Antarctica</li>
<li><input type="radio" name="answer13" value="Australia">Australia</li>
<li><input type="radio" name="answer13" value="SouthAmerica">South America</li>
</ul>
</div>
<!-- Question 14-->
<div class="wrapper">
<img src="question14.png" width="100%" height="80%">
<div class="question">In which country would you find the city of Dresden?</div>
<ul class="options">
<li><input type="radio" name="answer14" value="Germany">Germany</li>
<li><input type="radio" name="answer14" value="Austria">Austria</li>
<li><input type="radio" name="answer14" value="Belgium">Belgium</li>
</ul>
</div>
<!-- Question 15-->
<div class="wrapper">
<img src="question15.png" width="100%" height="80%">
<div class="question">Which is the most populated city in the world in 2023(with more than 37.27 milion inhabitants)?</div>
<ul class="options">
<li><input type="radio" name="answer15" value="Shanghai">Shanghai</li>
<li><input type="radio" name="answer15" value="Delhi">Delhi</li>
<li><input type="radio" name="answer15" value="Tokyo">Tokyo</li>
</ul>
</div>
<!-- Submit Answers Button-->
<div class="wrapper">
<table width="100%" height="60" align="center" border="0" cellspacing="5" cellpadding="5" bgcolor="#d98cb3">
<tr><td align="center"><button id="button" onclick="checkAnswers()" >Submit Answers</button></td></tr>
<tr><td align="center"><div class="result"></div></td></tr>
</table>
<!-- Nagivation Buttons-->
<table width="100%" height="60" align="center" border="0" cellspacing="5" cellpadding="5" bgcolor="#d98cb3">
<tr><td align="left"><button id="topbutton" class="navbuttons">Go to Top</button>
<script>
document.getElementById("topbutton").onclick = function() {
window.scrollTo(0, 0);
};
</script>
</td>
<td align="right">
<button id="restartbutton" class="navbuttons">Restart Quiz</button>
<script>
document.getElementById("restartbutton").onclick = function() {
location.reload();
window.scrollTo(0, 0);
};
</script>
</td>
</tr>
</table>
</div>
</div>
<div class="wrapper">
<table width="100%" height="50" align="center" border="0" cellspacing="5" cellpadding="5" bgcolor="#000000">
<tr><td align="center"><em><h4><font color="white">All rights reserved <br>@2023 JM's Web World</font></h4></em></td></tr>
</table>
</div>
<script src="script.js"></script><!-- This line links an external JavaScript file to add interactivity to the HTML document -->
</body> <!-- Closes body tag -->
</html> <!-- Closes html tag -->