kids friendly webiste

kids friendly webiste

Published by

Muhammad Usman

Published on

Jan 08, 2026

0 Likes

Details

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <title>English Vocabulary Website</title>


    <!-- CSS -->

    <style>

        body {

            font-family: Arial, sans-serif;

            background-color: #f2f6ff;

            margin: 0;

            padding: 0;

            text-align: center;

        }


        header {

            background-color: #3f51b5;

            color: white;

            padding: 20px;

        }


        section {

            margin: 30px auto;

            width: 80%;

            background: white;

            padding: 20px;

            border-radius: 10px;

        }


        .word {

            margin: 15px 0;

        }


        .meaning {

            color: #555;

        }


        button {

            margin: 10px;

            padding: 10px 15px;

            background-color: #3f51b5;

            color: white;

            border: none;

            border-radius: 5px;

            cursor: pointer;

        }


        button:hover {

            background-color: #2c3a8c;

        }


        footer {

            background-color: #ddd;

            padding: 10px;

        }

    </style>

</head>


<body>


    <header>

        <h1>English Vocabulary Website</h1>

        <p>Improve your English vocabulary easily</p>

    </header>


    <section class="vocab-section">

        <h2>Vocabulary List</h2>


        <div class="word">

            <h3>Brave</h3>

            <p class="meaning">Showing courage</p>

        </div>


        <div class="word">

            <h3>Happy</h3>

            <p class="meaning">Feeling joy or pleasure</p>

        </div>


        <div class="word">

            <h3>Quick</h3>

            <p class="meaning">Moving fast</p>

        </div>


        <button onclick="toggleMeanings()">Show / Hide Meanings</button>

    </section>


    <section class="quiz-section">

        <h2>Vocabulary Quiz</h2>

        <p>What is the meaning of <strong>"Brave"</strong>?</p>


        <button onclick="checkAnswer('wrong')">Feeling sad</button>

        <button onclick="checkAnswer('correct')">Showing courage</button>

        <button onclick="checkAnswer('wrong')">Moving fast</button>


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

    </section>


    <footer>

        <p>School Project | English Vocabulary</p>

    </footer>


    <!-- JavaScript -->

    <script>

        function toggleMeanings() {

            const meanings = document.querySelectorAll(".meaning");


            meanings.forEach(meaning => {

                if (meaning.style.display === "none") {

                    meaning.style.display = "block";

                } else {

                    meaning.style.display = "none";

                }

            });

        }


        function checkAnswer(answer) {

            const result = document.getElementById("result");


            if (answer === "correct") {

                result.textContent = "Correct! Well done 👍";

                result.style.color = "green";

            } else {

                result.textContent = "Wrong answer. Try again ❌";

                result.style.color = "red";

            }

        }

    </script>


</body>

</html>


Discussion

Please log in to like or comment.