StealThis .dev

LMS — Quiz Question Types

A complete set of six interactive quiz question components for an e-learning module: single-choice, multi-select, true/false, drag-to-match, fill-in-the-blank, and reorder-the-code. Each card grades independently with clear correct, incorrect, and missed states, plus a live progress bar, running score chip, and a decorative countdown timer. Keyboard-friendly throughout, calm light theme, vanilla JS only.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Quiz Question Types

A single knowledge-check screen from the fictional course Foundations of Web Craft, showing six distinct question patterns side by side. The header pairs a difficulty pill and live countdown with a progress bar and a running “X / 6 correct” score chip that appears as soon as the learner checks their first answer.

Every card is fully interactive and grades itself. Single-choice and true/false behave like radio groups; multi-select toggles like checkboxes and distinguishes wrong picks (red) from missed answers (dashed green). The drag-to-match card moves chips by pointer drag or by keyboard (activate a chip, then a row), and the reorder-the-code card sorts lines by drag or with the arrow keys. Fill-in-the-blank validates each input independently and tolerates trailing punctuation.

Checking an answer reveals inline feedback and color-codes the relevant options, while “Submit quiz” grades any remaining questions and toasts a final percentage. Styling is a calm light theme built entirely from CSS variables, it respects reduced-motion preferences, and the layout collapses cleanly to a mobile-first single column at ~360px. No frameworks, no build step.

Illustrative UI only — fictional courses, not a real learning platform.