Game

 avatar
unknown
plain_text
a month ago
2.2 kB
2
Indexable
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Cellular Respiration Quiz</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f3f4f6;
            text-align: center;
            padding: 20px;
        }
        .quiz-container {
            max-width: 600px;
            margin: auto;
            padding: 20px;
            background: #fff;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
        }
        h1 {
            color: #333;
        }
        .question {
            font-size: 1.2em;
            margin: 20px 0;
        }
        .options button {
            display: block;
            margin: 10px auto;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            background-color: #4caf50;
            color: white;
            font-size: 1em;
            cursor: pointer;
        }
        .options button:hover {
            background-color: #45a049;
        }
        .result {
            font-size: 1.5em;
            margin-top: 20px;
            color: #4caf50;
        }
    </style>
</head>
<body>
    <div class="quiz-container">
        <h1>Cellular Respiration Quiz</h1>
        <div class="question">What is the main purpose of cellular respiration?</div>
        <div class="options">
            <button onclick="checkAnswer('wrong')">a) Produce oxygen</button>
            <button onclick="checkAnswer('correct')">b) Generate ATP</button>
            <button onclick="checkAnswer('wrong')">c) Break down proteins</button>
            <button onclick="checkAnswer('wrong')">d) Store DNA</button>
        </div>
        <div class="result" id="result"></div>
    </div>

    <script>
        function checkAnswer(answer) {
            const resultDiv = document.getElementById("result");
            if (answer === "correct") {
                resultDiv.textContent = "Correct! Cellular respiration generates ATP.";
            } else {
                resultDiv.textContent = "Wrong! Try again.";
            }
        }
    </script>
</body>
</html>
Leave a Comment