Build a Claude Artifact Quiz for Students with Leaderboard
A Claude artifact quiz for students: one question at a time with instant feedback and an explanation, a missed-question review, and a shared class leaderboard.
Text prompt for Claude and ChatGPT
The prompt
Act as a front-end developer and middle-school science teacher. Build a single-file review quiz called Water Cycle Review for students aged 11-14, ready to publish as a Claude artifact. Start screen: title, topic, question count, a name field (first name or nickname, 1-20 characters, trimmed, inline error) and a Shuffle questions toggle. Write 10 accurate questions mixing four-option multiple choice and true/false. Rules: 1) Show one question at a time with a progress bar. Picking an answer locks it, marks it right or wrong with colour plus a ✓ or ✗ and text, shows the correct answer and a one-sentence explanation, then Next. 2) End screen: score, percent, time taken, missed questions with right answers, and Try again. 3) Leaderboard: top 10 by score, then fastest time, highlighting the student's row. Save scores with Claude's persistent artifact storage in shared mode (window.storage) inside try/catch so the whole class shares one board; otherwise keep it in memory, seeded with 4 fictional names. 4) A collapsed Teacher: edit questions panel with a textarea using lines like question | A | B | C | D | right letter | explanation (true/false lines use two options), plus an Apply button that validates and lists errors inline. 5) System fonts, calm light theme with dark mode and reduced-motion support, visible focus, labelled controls, keys 1-4 to answer, fits 360-1280px. No forms, localStorage, cookies, alerts or external files. Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.Example output
Tips and common edits
Why this works
- Naming window.storage shared mode with a try/catch fallback gives one class board in Claude and a working seeded board everywhere else.
- Locking each answer and showing icon, text and explanation turns the quiz into instant formative feedback, not just a score.
- A pipe-separated line format is easy for teachers to paste and simple for the page to validate line by line.
Paste into Claude and open it as an artifact; preview it, then publish or share the link with students. Also works in ChatGPT canvas, Gemini Canvas or saved as an .html file in any browser. The shared board needs Claude artifact storage (paid plan); elsewhere it resets on reload.
Common edits
- Swap in your own unit: open Teacher: edit questions, paste lines as question | A | B | C | D | letter | explanation, and press Apply.
- Ask for a 30-second per-question timer, or a second attempt that earns half marks before the explanation appears.
Reuse it: Use in a workflowTurn into a skillAdapt in the builder
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
More like this
Compound Interest Teaching Simulation as a Claude Artifact
Get a live one-page compound interest simulation with three sliders, a compound vs simple chart and a caption that explains each change.
60-Minute Lesson Plan with Checks for Understanding and Differentiation
Builds a timed, objective-aligned lesson plan with formative checks, differentiation, and a teach-or-revise readiness verdict. It asks for missing inputs first and keeps assumptions separate.
Make a Timed Practice Exam from Your Lecture Slides
Get a full practice exam that copies your real exam's sections, question types, marks and time limit, with each question tagged to its source slide and the answer key below a stop line.
Learn Verb Conjugations with Pattern-Grouped Irregulars and a Fill-In Quiz
You get a regular model table, irregular verbs grouped by shared patterns with short rules, and a 10-sentence quiz that repeats the verbs you miss.
Write Five Exit Ticket Questions That Sort Students by Mastery
Get five exit ticket questions, each tied to one part of today's objective, with a quick got it / partial / reteach sort rule and next-day moves for each group.
Differentiated Lesson Plan for a Mixed-Ability Class
Writes a timed lesson plan with one shared objective and three tiers of tasks, plus support for learners who need scaffolding and stretch tasks for those who finish early.
- Explain-Then-Quiz Tutor That Checks You Understood Each Idea
- Strict Essay Feedback That Grades Without Rewriting Your Work
- Diagnostic Quiz Builder with Answer Key and Misconception Remediation
- Rank Your Lecture Slides by What to Study First for Finals
- Build an Analytic Grading Rubric with Clear Level Descriptors for Any Assignment
- College Application Essay: Brainstorm Your Stories and Get Feedback Without Ghostwriting