Markdown Toolbox Logo Markdown Toolbox
Home
Blog

Markdown Unordered List vs Ordered List

2024-11-04

Short version

Unordered Lists

To create an unordered list, use either asterisks *, pluses +, or hyphens - at the beginning of each line.

* Item 1
* Item 2
* Item 3
  • Item 1
  • Item 2
  • Item 3

Ordered Lists

To create an ordered list, simply number the items followed by a period.

1. First item
2. Second item
3. Third item
  1. First item
  2. Second item
  3. Third item

Long version

Introduction

Markdown provides a straightforward way to format lists, enhancing both the readability and organization of your content. Lists in Markdown can be either ordered (numbered) or unordered (bulleted). In this guide, we'll discuss how to use both types of lists effectively.


1. Creating Unordered Lists

Unordered lists are used when the order of items does not matter. You can create them using:

  • Asterisk *: Use an asterisk followed by a space.
  • Plus +: Alternatively, use a plus sign followed by a space.
  • Hyphen -: You may also use a hyphen followed by a space.

Example:

-   First item
-   Second item
-   Third item

Rendered output:

  • First item
  • Second item
  • Third item

2. Creating Ordered Lists

Ordered lists are suitable for scenarios where the sequence of items is crucial. You create them by numbering each item followed by a period:

1. First item
2. Second item
3. Third item

Rendered output:

  1. First item
  2. Second item
  3. Third item

3. Nesting Lists

Both ordered and unordered lists can be nested. To nest a list, simply indent it with two spaces or a tab:

-   Main item 1
    -   Sub-item 1.1
    -   Sub-item 1.2
-   Main item 2

Rendered output:

  • Main item 1
    • Sub-item 1.1
    • Sub-item 1.2
  • Main item 2

Conclusion

Understanding how to use unordered and ordered lists in Markdown can greatly help in structuring your content. Always choose the type of list that best fits your data's context. With this knowledge, you'll be able to create clear, organized, and visually appealing Markdown documents.


Author's Note: For more detailed information on Markdown formatting, refer to the official Markdown guide.