Lists in Markdown
Organizing information with lists
Lists are a versatile method for organizing information in any document. Markdown supports several list types to help you present information such as shopping lists, To-Do items, tasks for the day, or product features, and these are a great way to display information clearly.
Unordered lists (bullet points)
Unordered lists create bullet points next to each list item and can be created using hyphens -
, asterisks *
, plus signs +
, followed by a space:
- Item 1
- Item 2
- Item 3
* Item 1
* Item 2
* Item 3
+ Item 1
+ Item 2
+ Item 3
Which will all display as:
- Item 1
- Item 2
- Item 3
Ordered lists (numbered lists)
Ordered lists are used to create lists in numerical order. Create them using numbers followed by periods/dots and a space:
1. First item
2. Second item
3. Third item
Displaying as:
1. First item
2. Second item
3. Third item
The numbers you use don't matter, Markdown will render the correct order when the document is converted:
1. First item
1. Second item
1. Third item
OR
1. First item
8. Second item
3. Third item
Both examples above will render as a list from 1 to 3. However, for clarity and maintenance, it's best to correctly number list items.
Nested Lists
You can create hierarchical lists by indenting items. Indent with spaces (typically 2 or 4 spaces) or a tab. Even mixing ordered and unordered lists if required:
- Monday
- Walk the dog
- Shopping
- Cheese
- Bread
- Tuesday
1. Visit friends
2. Create blog post
Task lists (checkboxes)
GitHub Flavored Markdown and other Markdown version support task lists (also known as checkbox or todo lists):
- [x] Create blog post
- [x] Walk the dog
- [ ] Shopping
- [x] Visit friends
- [ ] Gardening
When rendered in a supporting Markdown processor, it will appear as checkboxes:
- Create blog post
- Walk the dog
- Shopping
- Visit friends
- Gardening
These task lists are not part of the core Markdown specification but are widely supported in platforms like GitHub, GitLab, and many Markdown editors.
Definition lists
Some Markdown flavors (often those based on PHP Markdown Extra) support definition lists. Created by adding the term on the first line, on the following line, add a colon followed by the definition:
Term 1
: Definition 1
Term 2
: Definition 2A
: Definition 2B
When supported, this creates a term-definition structure similar to an HTML <dl>
element. Support for definition lists varies widely across Markdown processors.
Paragraphs in lists
List items can be extended to include paragraphs, indent the paragraphs to align with the text:
- Blog post idea- lists
Markdown lists blog post containing details on unordered an ordered lists, along with extended syntax.
- Blog post idea- text formatting
Cover all common text formatting including bold, italic, strikethrough, text highlighting, and code blocks.
Rendering as:
- Blog post idea- lists
Markdown lists blog post containing details on unordered an ordered lists, along with extended syntax. - Blog post idea- text formatting
Cover all common text formatting including bold, italic, strikethrough, text highlighting, and code blocks.