forked from JayathJSD/HacktoberFest-2022
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
76 lines (63 loc) · 3.03 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
<!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>Simple JS Quiz</title>
<link rel="stylesheet" href="css/style.css">
<script src="js/script.js"></script>
</head>
<body>
<div id="container">
<header>
<h1>Simple JavaScript Quiz</h1>
<p>Test your <strong>js fundarmentals</strong></p>
</header>
<section>
<div id="result">
</div>
<form name="quizFrom" onsubmit="return submitAnswers()"> <!--"onsubmit" is an event handler -->
<h3>
1. In which HTML element do we put in JS code?
</h3>
<input type="radio" name="q1" value="a" id="q1a"> a. <js> <br>
<input type="radio" name="q1" value="b" id="q1b"> b. <script> <br>
<input type="radio" name="q1" value="c" id="q1c"> c. <body> <br>
<input type="radio" name="q1" value="d" id="q1d"> d. <link> <br>
<h3>
2. which HTML attribute is used to referance an external JS file?
</h3>
<input type="radio" name="q2" value="a" id="q2a"> a.src <br>
<input type="radio" name="q2" value="b" id="q2b"> b. link <br>
<input type="radio" name="q2" value="c" id="q2c"> c. rel <br>
<input type="radio" name="q2" value="d" id="q2d"> d. href <br>
<h3>
3. How would you write "Hello World" in alert box?
</h3>
<input type="radio" name="q3" value="a" id="q3a"> a. alert("Hello World") <br>
<input type="radio" name="q3" value="b" id="q3b"> b. msg("Hello World") <br>
<input type="radio" name="q3" value="c" id="q3c"> c. alertBox("Hello World") <br>
<input type="radio" name="q3" value="d" id="q3d"> d. document.write("Hello World") <br>
<h3>
4. JS is directly based on "Java" programming language?
</h3>
<input type="radio" name="q4" value="a" id="q4a"> a. True <br>
<input type="radio" name="q4" value="b" id="q4b"> b. False <br>
<h3>
5. A variable in JS must start with which special character?
</h3>
<input type="radio" name="q5" value="a" id="q5a"> a. $ <br>
<input type="radio" name="q5" value="b" id="q5b"> b. # <br>
<input type="radio" name="q5" value="c" id="q5c"> c. & <br>
<input type="radio" name="q5" value="d" id="q5d"> d. No special character <br>
<br><br>
<input type="submit" value="Submit Answers" class="btn">
</form>
</section>
<footer>
<p>Copyright © 2021</p>
</footer>
</div>
</body>
</html>