﻿---
title: Lists
description: You can organize items into ordered and unordered lists. Unordered lists are created by starting each line with a hyphen -, asterisk *, or plus sign +...
url: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/3804/syntax/lists
products:
  - Elastic Docs Builder
---

# Lists
You can organize items into ordered and unordered lists.

## Basic Lists


### Unordered List

Unordered lists are created by starting each line with a hyphen `-`, asterisk `*`, or plus sign `+`.
<tab-set>
  <tab-item title="Output">
    - Item 1
    - Item 2
    - Item 3
  </tab-item>

  <tab-item title="Markdown">
    ```markdown
    - Item 1
    - Item 2
    - Item 3
    ```
  </tab-item>
</tab-set>


### Ordered List

Ordered lists are created by starting each line with a number followed by a period.
<tab-set>
  <tab-item title="Output">
    1. Item 1
    2. Item 2
    3. Item 3
  </tab-item>

  <tab-item title="Markdown">
    ```markdown
    1. Item 1
    2. Item 2
    3. Item 3
    ```
  </tab-item>
</tab-set>


## Nested Lists

When you want to create a nested list within a list item, indent the nested list by four spaces.

### Nested Unordered List

<tab-set>
  <tab-item title="Output">
    - Item 1
    - Item 2
      - Subitem 1
    - Subitem 2
      - Subsubitem 1
    - Subsubitem 2
    - Item 3
  </tab-item>

  <tab-item title="Markdown">
    ```markdown
    - Item 1
    - Item 2
        - Subitem 1
        - Subitem 2
            - Subsubitem 1
            - Subsubitem 2
    - Item 3
    ```
  </tab-item>
</tab-set>


### Nested Ordered Lists

<tab-set>
  <tab-item title="Output">
    1. Item 1
    2. Item 2
       1. Subitem 1
    2. Subitem 2
       1. Subsubitem 1
    2. Subsubitem 2
    3. Item 3
  </tab-item>

  <tab-item title="Markdown">
    ```markdown
    1. Item 1
    2. Item 2
        1. Subitem 1
        2. Subitem 2
            1. Subsubitem 1
            2. Subsubitem 2
    3. Item 3
    ```
  </tab-item>
</tab-set>


### Nested Mixed Lists

<tab-set>
  <tab-item title="Output">
    1. Item 1
    2. Item 2
       - Subitem 1
    - Subitem 2
      1. Subsubitem 1
    2. Subsubitem 2
       1. Subsubsubitem 1
    2. Subsubsubitem 2
    3. Item 3
       - Subitem 1
    - Subitem 2
      - Subsubitem 1
    - Subsubitem 2
    - Subsubsubitem 1
    - Subsubsubitem 2
  </tab-item>

  <tab-item title="Markdown">
    ```markdown
    1. Item 1
    2. Item 2
        - Subitem 1
        - Subitem 2
            1. Subsubitem 1
            2. Subsubitem 2
                1. Subsubsubitem 1
                2. Subsubsubitem 2
    3. Item 3
        - Subitem 1
        - Subitem 2
            - Subsubitem 1
            - Subsubitem 2
                - Subsubsubitem 1
                - Subsubsubitem 2
    ```
  </tab-item>
</tab-set>


## Content within a List Item

You can include any type of content within a list item, such as paragraphs, code blocks, or images.
To include a paragraph of text within a list item, indent the content by four spaces.
<tab-set>
  <tab-item title="Output">
    1. This is a list item with a paragraph of text.
       This is a `paragraph` of text within a list item.
    2. This is a list item with a code block:
       ```bash
       echo "Hello, World!"
       ```
    3. This is a list item with an image:
       ![Image](https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/3804/syntax/images/apm.png)
    4. This is a list item with an admonition:
       <note>
       This is a note within a list item.
       </note>
  </tab-item>

  <tab-item title="Markdown">
    ```markdown
    1. This is a list item with a paragraph of text.

        This is a `paragraph` of text within a list item.

    2. This is a list item with a code block:

        ```bash
        echo "Hello, World!"
        ```

    3. This is a list item with an image:

        ![Image](./images/apm.png)

    4. This is a list item with an admonition:

        :::{note}
        This is a note within a list item.
        :::
    ```
  </tab-item>
</tab-set>