<style>
body {
font-family: Arial, sans-serif;
padding: 20px;
}
#options button {
display: block;
margin: 10px 0;
padding: 10px;
width: 100%;
cursor: pointer;
background-color:aquamarine;
color: #000;
}
#result {
margin-top: 20px;
font-size: 1.2em;
}
#next {
display: none;
margin-top: 20px;
padding: 10px;
font-size: 1em;
}
#next{
background-color:aquamarine;
width: fit-content;
border: 1px solid black;
}
</style>
<p><b>Little Caesars is a fast food chain what serves primarily what type of food?</b></p>
<div id="options">
<button onclick="checkAnswer('A')">A)Pizza</button>
<button onclick="checkAnswer('B')">B)Hamburgers</button>
<button onclick="checkAnswer('C')">C)Barbecue</button>
<button onclick="checkAnswer('D')">D)Gyros</button>
</div>
<div id="result"></div>
<a href="https://righttrivia.com/which-religious-group-pioneered-the-anti-slavery-movement-in-the-17th-century/"
id="next" >Next Question >></a>
<script>
function checkAnswer(selectedOption) {
const correctAnswer = 'A'; // Correct answer is Pizza
const resultDiv = document.getElementById('result');
const optionsDiv = document.getElementById('options');
const nextButton = document.getElementById('next');
// Hide options
optionsDiv.style.display = 'none';
// Check the answer
if (selectedOption === correctAnswer) {
resultDiv.innerHTML = "Correct!";
} else {
resultDiv.innerHTML = "Incorrect. The correct answer is Pizza";
}
// Show the next button
nextButton.style.display = 'block';
}
function goToNextPage() {
// Redirect to another page or question
window.location.href = 'next-question.html';
}
</script>