Ekaterina Machneva

Quiz Game for Kids

This is a simple quiz game built using HTML, CSS and JavaScript. The questions are fetched from Open Trivia Database (opentdb.com) API and the game is designed to be easy for kids to play.

Features:

  • 10 questions are fetched from opentdb.com API with difficulty set to 'easy' and category set to 'animals'
  • A player can select only one answer for each question
  • The player's score is displayed at the end of the quiz and a play again button is provided

How to Play:

  1. Clone the repository to your local machine
  2. Open the index.html file in your browser
  3. Read each question and select the answer you think is correct
  4. Click the submit button to see if your answer is correct and to move on to the next question
  5. At the end of the quiz, your score will be displayed and a play again button will appear

Technical Details: The JavaScript file makes use of fetch API to retrieve the questions from opentdb.com API and dynamically generates the quiz content on the page. The score is calculated and displayed after each submit. The play again button is added when the quiz is completed, allowing the player to restart the game.

Screen Shot 2023-04-08 at 6 19 59 PM