> For the complete documentation index, see [llms.txt](https://docs.instruqt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.instruqt.com/tracks/challenges/add-a-quiz-to-a-track.md).

# Add quizzes

## Before you begin

A quiz is a multiple-choice question learners must answer during a track before proceeding to the next challenge. Each quiz needs at least two possible answers. You can assign one or more answers as correct. Each challenge supports only one quiz. To add additional quizzes, create a separate challenge for each one.

**Note:** The `solution` field uses **zero-based indexing**, meaning `0` refers to the first choice.

## Add a quiz challenge

You can add a quizzes using the Web UI or the Instruqt CLI.

{% tabs %}
{% tab title="🌐 Web UI" %}

1. Click the track you want to add a quiz to.
2. In the **Challenges** section, click **Add new** and select **Multiple choice** from the dropdown.
3. Provide a **Name**, **URL**, and **Description** for the challenge.
4. Click **Save**.
5. In the **Quiz** tab, input a question in the Editor.
6. Click **Add answer** as many times as needed to generate possible choices
7. Click the **This is a correct answer** checkbox beside all correct choices
8. Click **Save changes**.
   {% endtab %}

{% tab title="💻 Instruqt CLI" %}

1. Change into the track directory you want to add a quiz to:

   ```xml
   cd <track-directory>
   ```
2. Add a challenge to the track:

   ```
   instruqt challenge create --title "Example quiz title"
   ```
3. Open the `assignment.md` file of the newly created challenge and replace its content with the following (modify as needed):

   ```yaml
   ---
   slug: example-quiz-title
   type: quiz
   title: Example quiz title
   teaser: Example quiz
   answers:
   - 42
   - Sun
   - Instruqt
   solution:
   - 0
   difficulty: basic
   timelimit: 600
   ---
   What is the answer to the universe?
   ```
4. Save the `assignment.md` file and push the changes to Instruqt:
5. ```
   instruqt track push
   ```

{% endtab %}
{% endtabs %}
