write a HTML code:

Include at least one question.
Include at least three possible answers for your question.
Include a message that indicates whether the correct button was clicked.

1 answer

<!DOCTYPE html>
<html>
<head>
<title>Quiz Time!</title>
</head>
<body>
<h1>What is the capital of France?</h1>

<button id="parisBtn" onclick="checkAnswer('paris')">Paris</button>
<button id="londonBtn" onclick="checkAnswer('london')">London</button>
<button id="berlinBtn" onclick="checkAnswer('berlin')">Berlin</button>

<p id="result"></p>

<script>
function checkAnswer(answer) {
if(answer === 'paris') {
document.getElementById('result').innerText = "Correct! Paris is the capital of France.";
} else {
document.getElementById('result').innerText = "Incorrect. Please try again.";
}
}
</script>
</body>
</html>
Similar Questions
    1. answers icon 1 answer
  1. Multiple ChoiceWhat does a code of conduct include? A. a secret code for Internet users B. the conduct that should be used with
    1. answers icon 7 answers
  2. What does a code of conduct include?(1 point) A a secret code for Internet users B the conduct that should be used with the code
    1. answers icon 1 answer
    1. answers icon 4 answers
more similar questions