Geography Quiz
How do I make an geography quiz?
What is a geography quiz? How do you make a geography quiz? This script and codes were developed by Yang Li on 13 July 2022, Wednesday.
Geography Quiz - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Geography Quiz</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Test Your Flag Knowledge!</h1>
<hr />
<p>Guess the country and click the flag to reveal the answer!</p>
<button id="resetBtn">Reset</button>
<div id="container"> <img id="flag1" src="http://www.flagsaustralia.com.au/images/Australia-1908-(blue)l.jpg" alt="" /> <div id="flag1name"> AUSTRALIA </div> <img id="flag2" src="http://www.smh.com.au/cqstatic/gjc835/30silverfernblue.png" alt="" /> <div id="flag2name"> NEW ZEALAND </div> <img id="flag3" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5b/Flag_of_Hong_Kong.svg/1280px-Flag_of_Hong_Kong.svg.png" alt="" /> <div id="flag3name"> HONG KONG </div>
</div> <script src="js/index.js"></script>
</body>
</html>
Geography Quiz - Script Codes CSS Codes
#resetBtn { margin: 10px; font-size: 20px;
}
#container { display: flex; justify-content: space-around;
}
img { width: 30%; height: 200px;
}
#container div { display: none; width: 30%; height: 200px; border: 1px dotted grey; font-size: 30px; justify-content: center; align-items: center;
}
Geography Quiz - Script Codes JS Codes
var australia = document.getElementById("flag1");
var nz = document.getElementById("flag2");
var hk = document.getElementById("flag3");
var ausName = document.getElementById("flag1name");
var nzName = document.getElementById("flag2name");
var hkName = document.getElementById("flag3name");
australia.onclick = function() { australia.style.display = "none"; ausName.style.display = "flex";
}
nz.onclick = function() { nz.style.display = "none"; nzName.style.display = "flex";
}
hk.onclick = function() { hk.style.display = "none"; hkName.style.display = "flex";
}
document.getElementById("resetBtn").onclick = function() { australia.style.display = "flex"; nz.style.display = "flex"; hk.style.display = "flex"; ausName.style.display = "none"; nzName.style.display = "none"; hkName.style.display = "none";
}
Developer | Yang Li |
Username | aussieyang |
Uploaded | July 13, 2022 |
Rating | 3 |
Size | 2,136 Kb |
Views | 87,032 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
CSS Photoframe | 1,736 Kb |
Responding Boxes | 1,943 Kb |
PokemonJourney | 2,688 Kb |
Googly Eye | 2,468 Kb |
Sunny Day Driving Starter | 1,563 Kb |
Birthday Party Starter | 1,629 Kb |
Battleships | 2,879 Kb |
My Friends Starter | 1,573 Kb |
Mac Bar | 2,204 Kb |
Hamburger Menu Starter | 1,682 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Pictos font library from CodePen | Jstam | 3,790 Kb |
Responsive Minimal Blog Layout | Hackthevoid | 5,261 Kb |
Simple jQuery Slider | Jurbank | 2,874 Kb |
Light Switch | Bartuc | 4,933 Kb |
A Bouncy Menu Toggle | Billyysea | 4,563 Kb |
About Mazano | Kiti | 2,585 Kb |
Fading gradient button | Insprd | 1,713 Kb |
Formations | Cantelope | 5,731 Kb |
Page Transitions in Backbone | Mikefowler | 3,691 Kb |
Border-radius animation | Yukulele | 2,480 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!