Word Riddle Fun Game body { font-family: Arial, sans-serif; margin: 0; padding: 0; background: url(‘https://thelifenavigator.com/wp-content/uploads/2025/01/d0da8-dallc2b7e-2024-10-25-09.15.31-a-cartoon-character-of-a-girl-with-long-hair-similar-to-the-one-in-the-uploaded-image-smiling-and-giving-a-thumbs-up-saying-all-the-best.-the-gir.jpg’) no-repeat center top / cover; color: #333; } header { text-align: center; padding: 10px; background-color: rgba(255, 204, 204, 0.8); } header h1 { margin: 0; font-size: 24px; color: #d32f2f; } header img { width: 120px; height: auto; margin: 10px auto; } #game-container { text-align: center; padding: 20px; background-color: rgba(255, 255, 255, 0.9); margin: 20px auto; border-radius: 10px; width: 90%; max-width: 600px; box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); } .category-buttons { margin: 20px 0; } .category-buttons button { padding: 10px 20px; margin: 5px; border: none; background-color: #4caf50; color: white; font-size: 16px; border-radius: 5px; cursor: pointer; transition: background-color 0.3s; } .category-buttons button:hover { background-color: #388e3c; } #riddle-container { margin: 20px 0; } #riddle { font-size: 18px; font-weight: bold; color: #ff5722; margin-bottom: 20px; } #type-word-input { font-size: 18px; padding: 10px; width: 80%; max-width: 300px; border: 2px solid #ff5722; border-radius: 5px; } #submit-btn, #back-btn { padding: 10px 20px; margin: 10px 5px; background-color: #ff9800; color: white; border: none; border-radius: 5px; font-size: 16px; cursor: pointer; transition: background-color 0.3s; } #submit-btn:hover, #back-btn:hover { background-color: #e65100; } #result { margin-top: 20px; font-size: 18px; } #thank-you { font-size: 20px; color: #4caf50; margin-top: 20px; } #emoji { font-size: 50px; } @media (max-width: 600px) { #riddle { font-size: 16px; } #type-word-input { font-size: 16px; } #submit-btn, #back-btn { font-size: 14px; } }

Word Riddle Fun Game

Welcome Banner
How to Play:
  1. Select a category to begin (Fruits, Vegetables, Things, etc.).
  2. A riddle will appear, and you must type the answer.
  3. Click “Submit” to check your answer.
  4. Click “Back” to choose another category.
  5. At the end, see a fun emoji and a thank-you message!
Fruits Vegetables Things Places Animals Birds
const riddles = { Fruits: [ { question: “I am yellow and monkeys love me. What am I?”, answer: “Banana” }, { question: “I am red and round, and you can make juice from me. What am I?”, answer: “Apple” }, { question: “I am orange, and rabbits love me. What am I?”, answer: “Carrot” }, { question: “I am green on the outside and red inside with black seeds. What am I?”, answer: “Watermelon” }, { question: “I am sour and yellow, often used in drinks. What am I?”, answer: “Lemon” }, ], Vegetables: [ { question: “I am long, green, and used in salads. What am I?”, answer: “Cucumber” }, { question: “I grow underground and make you cry when you cut me. What am I?”, answer: “Onion” }, { question: “I am green and round, and grow in a pod. What am I?”, answer: “Pea” }, { question: “I am orange and grow underground. What am I?”, answer: “Carrot” }, { question: “I am green and look like tiny trees. What am I?”, answer: “Broccoli” }, ], Things: [ { question: “You sit on me. What am I?”, answer: “Chair” }, { question: “I have pages and you read me. What am I?”, answer: “Book” }, { question: “I keep time for you. What am I?”, answer: “Clock” }, { question: “I help you write. What am I?”, answer: “Pen” }, { question: “I hold water and you drink from me. What am I?”, answer: “Glass” }, ], Places: [ { question: “I am a place where you learn. What am I?”, answer: “School” }, { question: “I am a place where sick people go. What am I?”, answer: “Hospital” }, { question: “I am a place with lots of trees and animals. What am I?”, answer: “Forest” }, { question: “I am a place with sand and water. What am I?”, answer: “Beach” }, { question: “I am a place where you buy things. What am I?”, answer: “Market” }, ], Animals: [ { question: “I roar and live in the jungle. What am I?”, answer: “Lion” }, { question: “I am man’s best friend. What am I?”, answer: “Dog” }, { question: “I purr and chase mice. What am I?”, answer: “Cat” }, { question: “I live in water and have fins. What am I?”, answer: “Fish” }, { question: “I am big and have a trunk. What am I?”, answer: “Elephant” }, ], Birds: [ { question: “I am colorful and can talk. What am I?”, answer: “Parrot” }, { question: “I am black and can caw. What am I?”, answer: “Crow” }, { question: “I lay eggs and people eat them. What am I?”, answer: “Hen” }, { question: “I am pink and stand on one leg. What am I?”, answer: “Flamingo” }, { question: “I fly at night and can see in the dark. What am I?”, answer: “Owl” }, ] }; const categorySelection = document.getElementById(“category-selection”); const riddleContainer = document.getElementById(“riddle-container”); const riddleElement = document.getElementById(“riddle”); const typeWordInput = document.getElementById(“type-word-input”); const result = document.getElementById(“result”); const thankYou = document.getElementById(“thank-you”); const emoji = document.getElementById(“emoji”); const bgMusic = document.getElementById(“bg-music”); let currentCategory = “”; let currentRiddleIndex = 0; const setCategory = (category) => { currentCategory = category; currentRiddleIndex = 0; categorySelection.style.display = “none”; riddleContainer.style.display = “block”; loadRiddle(); bgMusic.play(); }; const loadRiddle = () => { const riddle = riddles[currentCategory][currentRiddleIndex]; riddleElement.textContent = riddle.question; }; const checkAnswer = () => { const userAnswer = typeWordInput.value.trim(); const correctAnswer = riddles[currentCategory][currentRiddleIndex].answer; if (userAnswer.toLowerCase() === correctAnswer.toLowerCase()) { result.textContent = “Correct! 🎉”; result.style.color = “green”; } else { result.textContent = `Wrong! The correct answer was “${correctAnswer}”.`; result.style.color = “red”; } currentRiddleIndex++; if (currentRiddleIndex { riddleContainer.style.display = “none”; thankYou.style.display = “block”; emoji.textContent = “😊”; }; const resetGame = () => { categorySelection.style.display = “block”; riddleContainer.style.display = “none”; thankYou.style.display = “none”; result.textContent = “”; bgMusic.pause(); bgMusic.currentTime = 0; };

© The Life Navigator ( for PSYFISKILLs EDUVERSE PVT. LTD.) – 2023-2025