|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en-us"> |
| 3 | + |
| 4 | +<head> |
| 5 | +<meta charset="utf-8"> |
| 6 | +<title>Simple JS Quiz</title> |
| 7 | +<link rel="stylesheet" href="css/style.css"> |
| 8 | +<script src="js/script.js"></script> |
| 9 | + |
| 10 | +</head> |
| 11 | + |
| 12 | +<body> |
| 13 | + |
| 14 | +<div id="container"> |
| 15 | + |
| 16 | + <header> |
| 17 | + <img id="js-logo" src="js_blue.png" alt="JavaScript Logo by seoexpresso.com" /> |
| 18 | + <h1>Simple JavaScript Quiz</h1> |
| 19 | + <p>Test your knowledge in <strong>JavaScript fundamentals</strong>.</p> |
| 20 | + </header> |
| 21 | + |
| 22 | + <section> |
| 23 | + |
| 24 | + <form name="quiz-form" onsubmit="return submitAnswers()"> |
| 25 | + <h3>1. In which HTML element do we put in JavaScript code?</h3> |
| 26 | + <input type="radio" name="q1" value="a" id="q1a">a. <js><br> |
| 27 | + <input type="radio" name="q1" value="b" id="q1b">b. <script><br> |
| 28 | + <input type="radio" name="q1" value="c" id="q1c">c. <body><br> |
| 29 | + <input type="radio" name="q1" value="d" id="q1d">d. <link><br> |
| 30 | + |
| 31 | + <h3>2. Which HTML attribute is used to reference an external JavaScript file?</h3> |
| 32 | + <input type="radio" name="q2" value="a" id="q2a">a. src<br> |
| 33 | + <input type="radio" name="q2" value="b" id="q2b">b. rel<br> |
| 34 | + <input type="radio" name="q2" value="c" id="q2c">c. type<br> |
| 35 | + <input type="radio" name="q2" value="d" id="q2d">d. href<br> |
| 36 | + |
| 37 | + <h3>3. How would you write "Hello" in an alert box?</h3> |
| 38 | + <input type="radio" name="q3" value="a" id="q3a">a. msg("Hello");<br> |
| 39 | + <input type="radio" name="q3" value="b" id="q3b">b. alertBox("Hello");<br> |
| 40 | + <input type="radio" name="q3" value="c" id="q3c">c. document.write("Hello");<br> |
| 41 | + <input type="radio" name="q3" value="d" id="q3d">d. alert("Hello");<br> |
| 42 | + |
| 43 | + <h3>4. JavaScript is directly related to the "Java" programming language.</h3> |
| 44 | + <input type="radio" name="q4" value="a" id="q4a">a. True<br> |
| 45 | + <input type="radio" name="q4" value="b" id="q4b">b. False<br> |
| 46 | + |
| 47 | + <h3>5. A variable in JavaScript must start with which special character?</h3> |
| 48 | + <input type="radio" name="q5" value="a" id="q5a">a. @<br> |
| 49 | + <input type="radio" name="q5" value="b" id="q5b">b. $<br> |
| 50 | + <input type="radio" name="q5" value="c" id="q5c">c. #<br> |
| 51 | + <input type="radio" name="q5" value="d" id="q5d">d. No special character<br> |
| 52 | + <br> |
| 53 | + <br> |
| 54 | + |
| 55 | + <input type="submit" value="Submit Answers"> |
| 56 | + |
| 57 | + <div id="results"></div> |
| 58 | + |
| 59 | + </form> |
| 60 | + |
| 61 | + </section><!-- end of main section --> |
| 62 | + |
| 63 | + <footer> |
| 64 | + <p>A portfolio project by Drew Mery through the <em>Eduonix Learning</em> course, "Projects in JavaScript & jQuery".</p> |
| 65 | + </footer> |
| 66 | + |
| 67 | +</div><!-- end of container --> |
| 68 | + |
| 69 | +</body> |
| 70 | +</html> |
0 commit comments