Skip to content

Intro Text

The intro text panel provides users with helpful information about quiz progress storage and a convenient reset button to clear their progress.

Basic Usage

Add the special comment anywhere in your markdown:

<!-- mkdocs-quiz intro -->

This generates a panel that includes:

  • Information text: Explains that quiz results are saved to the browser's local storage
  • Reset button: Clears all quiz progress on the current page

Example

The intro text looks best inside an admonition box:

Quiz Progress

Quiz results are saved to your browser's local storage and will persist between sessions.

!!! info "Quiz Progress"
    <!-- mkdocs-quiz intro -->

Placement Suggestions

At the Top of a Quiz Page

Place the intro text before any quizzes to set expectations:

# Chapter 5 Quiz

!!! info "Before You Begin"

<!-- mkdocs-quiz intro -->

<quiz>
First question...
</quiz>

In a Collapsible Section

Use with pymdownx.details for a collapsible info box:

About This Quiz

Quiz results are saved to your browser's local storage and will persist between sessions.

This quiz covers material from chapters 1-5.

??? info "About This Quiz"
    <!-- mkdocs-quiz intro -->

    This quiz covers material from chapters 1-5.

Standalone

Without an admonition, the intro text renders as plain text with a reset link:

Quiz results are saved to your browser's local storage and will persist between sessions.

When to Use Intro Text

The intro text is particularly useful when:

  • Users might return to a quiz page and wonder why their answers are pre-filled
  • You want to give users an easy way to retry quizzes
  • Pages have multiple quizzes and users need to reset them all at once

Progress Sidebar

On pages with multiple quizzes, the Progress Tracking sidebar also includes a reset link. You may not need intro text if using the progress sidebar.

Customizing the Text

The intro text content is translatable. See Translations for details on customizing or translating the text.