Auto-numbering
Turn on auto-numbering to prefix every quiz with a “Question N” heading, numbered in order down the page. It’s off by default.
Enable it everywhere
Section titled “Enable it everywhere”Set it once as a site-wide default so every quiz is numbered:
starlightQuiz({ quizDefaults: { autoNumber: true },});Per quiz
Section titled “Per quiz”Or opt a single quiz in (or out) with the autoNumber prop, which overrides the site default:
What does HTTP stand for?
- HyperText Transfer Protocol
- High Throughput Transfer Path
<Quiz autoNumber>What does HTTP stand for?
- [x] HyperText Transfer Protocol- [ ] High Throughput Transfer Path</Quiz>The count continues across the page, so a second numbered quiz becomes Question 2:
Which port does HTTPS use by default?
- 443
- 80
The number is the quiz’s position among the auto-numbered quizzes on the page, computed in the browser, so it stays
correct even with shuffled answers or after an Astro view transition. The
heading is a .sl-quiz-number element you can restyle.
answered: 0 / 0 (0%)