A simple quiz app built with a single HTML file (with embedded CSS and JS) that reads quiz data from JSON.
- Loads quiz questions from JSON
- Multiple-choice questions
- Score tracking
- Lightweight, no build tools
- Clone/download this repo
- Open the HTML file in your browser
Each quiz should include:
id(string, unique)title(string)questions(array)
Each question should include:
id(string, unique within quiz)prompt(string)choices(array of strings)answerIndex(number; zero-based index inchoices)explanation(optional string)
Example:
[
{
"question": "What is the capital of France?",
"options": ["Berlin", "Madrid", "Paris", "Rome"],
"answer": "Paris"
}
]QuickQuizJSON.html— app UI + styles + logic*.json— quiz data files, there's some examples in theexamplesfolder
This is a small personal project, so the setup is intentionally minimal.
Built with vanilla HTML, CSS, and JavaScript.