Create a full-featured quiz generator where users can build custom quizzes with multiple choice and true/false questions, set correct answers, take quizzes with real-time scoring, review results with correct and wrong answers highlighted, and share quiz results. All quizzes persist in localStorage for easy access.
Build Prompt
Copy this prompt into Claude Code
Build a single-page quiz generator as a static HTML/CSS/JS site. Use a dark theme with background #0f0f17 and a centered content area (max-width 680px). The accent color is #8b5cf6 (purple).
The app has three views: Quiz Library, Quiz Builder, and Quiz Taker. Navigation between views uses simple JavaScript state management (no router needed). The Quiz Library is the default landing view.
The Quiz Library view shows a list of saved quizzes as cards. Each card displays the quiz title, number of questions, date created, and a "best score" badge if the quiz has been taken before. Each card has three action buttons: "Take Quiz" (accent color), "Edit" (gray outline), and "Delete" (red text, with confirmation dialog). At the top, a prominent "Create New Quiz" button opens the Quiz Builder. If no quizzes exist, show a friendly empty state: "No quizzes yet. Create your first quiz to get started!" with an illustration-like CSS shape (stacked cards icon made with CSS borders).
The Quiz Builder view has a form for creating or editing a quiz. At the top, a text input for the quiz title (required, placeholder: "My Geography Quiz") and an optional description textarea. Below, a questions list where each question is an expandable card. The "Add Question" button at the bottom opens a new question form inline.
Each question form has: a question type selector (radio buttons: "Multiple Choice" or "True/False"), a question text textarea, and answer options. For Multiple Choice: four answer input fields (A, B, C, D) with a radio button next to each to mark the correct answer. The correct answer radio button has an accent color fill. Users must fill at least 2 answer options and select one correct answer. For True/False: simply two radio buttons "True" and "False" with one selected as correct. Each question card shows its number, the question text truncated to one line, the type badge, and a collapse/expand toggle. Include a drag handle for reordering questions (implement with mousedown/touchstart drag and drop), and a delete button per question.
The builder has a "Save Quiz" button that validates: title must not be empty, at least 2 questions required, each question must have text and a correct answer marked. On validation failure, scroll to the first error and show an inline red error message. Saved quizzes go to localStorage and the user returns to the Quiz Library.
The Quiz Taker view shows one question at a time with a progress bar at the top ("Question 3 of 15"). The question text is displayed in large font (1.3rem). Answer options are displayed as clickable cards with rounded borders. When clicked, the selected option gets the accent color border. A "Next" button advances to the next question. Users can navigate back to previous questions and change answers — their selections are preserved. The last question shows "Submit Quiz" instead of "Next."
After submission, show a Results screen with: score (correct/total), percentage with a large circular progress ring drawn with CSS (green if 80%+, yellow if 50-79%, red if under 50%), time taken, and a detailed question-by-question review. In the review, each question shows the question text, the user's selected answer (highlighted green if correct, red if wrong), and the correct answer (always shown in green with a checkmark). Wrong answers show the correct answer below with "Correct answer:" label.
Add a "Share Results" button that generates a shareable text string: "I scored 8/10 (80%) on [Quiz Title]! Try it yourself:" and copies it to clipboard. Also add a "Retake Quiz" button that resets answers and restarts, and a "Back to Library" button.
Store all quiz data (questions, answers, user attempts with timestamps and scores) in localStorage. Keep the last 5 attempts per quiz so users can see their score history in the quiz card on the library view as a small sparkline-style trend (show dots representing scores).
Make it responsive: on mobile, answer options stack vertically with larger touch targets (min-height 48px), and the quiz builder form uses full-width inputs. Add keyboard navigation: Enter to advance, number keys 1-4 to select answers in multiple choice.
Read the guide at https://accessagent.ai/api/guide and follow it to deploy the site to AccessAgent.ai. My email is [your@email.com].
Make It Yours
Timed Quizzes
Add an optional time limit per quiz or per question. Show a countdown timer and auto-advance when time runs out on a question.
Import from Text
Let users paste questions in a simple format (Q: question, A: answer, *A: correct answer) and auto-parse them into a quiz.
Randomize Options
Add a toggle to shuffle answer order on each quiz attempt so users cannot memorize position patterns when retaking.
Explanation Field
Add an optional "explanation" text field per question shown after answering. Helps with learning by explaining why the correct answer is right.
Quiz Categories
Let users tag quizzes with categories (Science, History, Math) and filter the library view by category for better organization.
URL Sharing
Encode quiz data as a compressed base64 URL hash so entire quizzes can be shared via link without a backend.
SEO Tips
Target "quiz maker" and "online quiz generator" as primary keywords — these have 30K+ monthly searches from teachers and content creators.
Create subject-specific landing pages like "science quiz maker" and "history quiz generator" to capture educational long-tail traffic.
Add FAQ schema answering "How to make an online quiz for free" and "What is the best quiz maker for teachers" to target featured snippets.
Write a blog post titled "How to Create Effective Multiple Choice Questions" linking to your quiz builder as the free tool to practice with.
Include pre-made sample quizzes (US States, World Capitals, Basic Math) that search engines can index and users can try immediately.
Monetization Ideas
Offer a premium tier ($4.99/month) with unlimited questions per quiz (free tier capped at 20), image support in questions, and quiz analytics.
Sell pre-made quiz packs for standardized test prep (SAT, GRE, TOEFL) at $7.99 per subject with detailed explanations.
Add a classroom license ($24/year) where teachers can assign quizzes to students and see individual and class-wide results dashboards.
Offer embeddable quiz widgets for bloggers and educators who want to add interactive quizzes to their websites for $9.99 one-time.
Create a certification feature — users who pass quizzes above 90% can generate a branded PDF certificate for $1.99 per certificate.