-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
128 lines (128 loc) · 4.08 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>The Simple Quiz</title>
<link rel="stylesheet" href="./styles.css" />
</head>
<body>
<main class="br1half">
<!-------------------------
Header - Title & Time Countdown
------------------------->
<header class="p2 m2">
<h1>The Simple Quiz</h1>
<div class="timer">
<h4>Time left: <span>15</span></h4>
</div>
</header>
<!-------------------------
Get started page - Instructions
------------------------->
<section class="get-started">
<div class="instructions br1half">
<h2>Click the button below to start the quiz.</h2>
<p class="p2">
You will have 15 seconds to complete each question. There will be a
total of 5 questions.
</p>
<h3 class="p2">Good luck!</h3>
</div>
<button id="start-btn" type="button" class="start-button p2 m2 br1half">
Get started
</button>
</section>
<!-------------------------
Main quiz body
------------------------->
<section class="main-quiz">
<!-- Progress - Bar in percent & Display question count -->
<section class="progress-container m2 br1half">
<progress class="progress-bar p2" value="0" max="100"></progress>
<p>
Question <span class="current-question">0</span> of
<span class="total-questions">20</span>
</p>
</section>
<!-- Questions & Answers -->
<section class="qa-container p2 m2">
<h2 id="question">What does HTML stands for?</h2>
<div class="option-buttons">
<button
data-index="0"
id="option-1"
type="button"
class="p2 br1half option"
onclick="optionClicked(this)"
>
...
</button>
<button
data-index="1"
id="option-2"
type="button"
class="p2 br1half option"
onclick="optionClicked(this)"
>
...
</button>
<button
data-index="2"
id="option-3"
type="button"
class="p2 br1half option"
onclick="optionClicked(this)"
>
...
</button>
<button
data-index="3"
id="option-4"
type="button"
class="p2 br1half option"
onclick="optionClicked(this)"
>
...
</button>
</div>
</section>
<!-------------------------
Footer buttons
------------------------->
<footer class="p2 m2">
<button type="button" class="check-answer p2 br1half">
Check answer
</button>
<button type="button" class="next-question p2 br1half">
Next question
</button>
<button type="button" class="finish-quiz p2 br1half">
Finish quiz
</button>
<button type="button" class="quit-quiz p2 br1half">Quit Quiz</button>
</footer>
</section>
<!-------------------------
Score page
------------------------->
<section class="final-score">
<div class="display-score br1half">
<h2>Your total correct answers:</h2>
<span class="my-score">0</span> out of
<span class="total-score">20</span>
<h3 class="p2">Well done!</h3>
</div>
<button id="restart-btn" type="button" class="start-button p2 br1half">
Restart Quiz
</button>
<button type="button" class="quit-quiz score-quit p2 br1half">
Quit Quiz
</button>
</section>
</main>
</body>
<!-- Local JavaScript file -->
<script src="./script.js"></script>
</html>