Multiple choice
Choice questions are written as a markdown task list. The number of correct answers decides the question type. You never set it explicitly.
Single choice (radio buttons)
Section titled “Single choice (radio buttons)”Exactly one correct answer renders as radio buttons. Single-choice quizzes auto-submit on selection by default:
What is the capital of France?
- London
- Paris
- Berlin
<Quiz>What is the capital of France?
- [ ] London- [x] Paris- [ ] Berlin</Quiz>Multiple choice (checkboxes)
Section titled “Multiple choice (checkboxes)”More than one correct answer renders as checkboxes with a Submit button. The reader must select all correct answers and only the correct answers:
Which of these are even numbers?
- 2
- 3
- 4
- 5
<Quiz>Which of these are even numbers?
- [x] 2- [ ] 3- [x] 4- [ ] 5</Quiz>Per-answer feedback
Section titled “Per-answer feedback”Add a blockquote (>) indented underneath an answer to show feedback specific to that choice after submitting. Each
feedback box is badged with the answer it belongs to, so it is always clear which choice the note responds to.
Single choice
Section titled “Single choice”Pick an answer to reveal its feedback:
Which language runs natively in the browser?
- JavaScript
Correct. JavaScript is the language of the web.
- Python
Python needs a server or a runtime like Pyodide to run in the browser.
- C++
<Quiz>Which language runs natively in the browser?
- [x] JavaScript > Correct. JavaScript is the language of the web.- [ ] Python > Python needs a server or a runtime like Pyodide to run in the browser.- [ ] C++</Quiz>Multiple choice
Section titled “Multiple choice”When more than one selected answer carries feedback, every box is shown together — the badges keep them apart. Select a few options below before submitting:
Which of these are programming languages?
- Python
Yes — a general-purpose programming language.
- Rust
Yes — a systems programming language.
- HTML
No — HTML is a markup language for structuring content.
- HTTP
No — HTTP is a protocol for transferring data over the web.
<Quiz>Which of these are programming languages?
- [x] Python > Yes — a general-purpose programming language.- [x] Rust > Yes — a systems programming language.- [ ] HTML > No — HTML is a markup language for structuring content.- [ ] HTTP > No — HTTP is a protocol for transferring data over the web.</Quiz>Content section
Section titled “Content section”Any markdown after the answers becomes a content section that is revealed once the quiz is submitted, handy for explanations. See Advanced formatting for richer content.
What is Astro?
- A web framework
- A database
- A text editor
Astro is a web framework for building content-driven websites, with an islands architecture for shipping less JavaScript.
<Quiz>What is Astro?
- [x] A web framework- [ ] A database- [ ] A text editor
**Astro** is a web framework for building content-driven websites, with anislands architecture for shipping less JavaScript.</Quiz>answered: 0 / 0 (0%)