How to Write Lists, Blockquotes, and Code Blocks in Markdown (Markdown 101 - Part 03)

// SERIES: Markdown 101 (10 lessons · Jump to any part)
  1. 01 Capstone Practice - Write a Complete Markdown Article from Scratch (Markdown 101 - Part 10)
  2. 02 How to Add Links and SEO-Friendly Images in Markdown (Markdown 101 - Part 04)
  3. 03 How to Create Tables and Horizontal Rules in Markdown (Markdown 101 - Part 07)
  4. 04 How to Preview and Publish Markdown Posts to Hugo on GitHub Pages (Markdown 101 - Part 06)
  5. 05 How to Use Obsidian Callouts and Wikilinks and Export Cleanly to Hugo (Markdown 101 - Part 09)
  6. 06 How to Write Checklists, Footnotes, and Escaped Characters in Markdown (Markdown 101 - Part 08)
  7. 07 How to Write Headings, Paragraphs, and Emphasis in Markdown (Markdown 101 - Part 02)
  8. 08 How to Write Lists, Blockquotes, and Code Blocks in Markdown (Markdown 101 - Part 03)
  9. 09 Minimal Markdown Post Template and YAML Front Matter for Blogs (Markdown 101 - Part 05)
  10. 10 What Is Markdown and How to Create Your First .md File (Markdown 101 - Part 01)

Markdown 101 · Part 3/10

Use - for unordered items, 1. for sequential steps, > for blockquotes, and backticks (`) for inline code or multi-line code blocks.

Unordered, Ordered, and Nested Lists

Use - (or *) for peer items, and 1., 2., 3. when order matters:

What you need:

- A text editor.
- A Markdown file.

Steps to publish:

1. Create `post.md`.
2. Write the draft.
   - Check spelling and links.
3. Preview and publish.

Indent nested sub-items by 2 or 4 spaces, and always leave a blank line before starting a list. For interactive task lists in Obsidian, GitHub, or Hugo, use - [ ] and - [x].

Blockquotes With Context

> Write one idea clearly before moving on to the next.

Prefix lines with > to create a blockquote. When quoting someone else’s work, always include the author’s name and a link to the original source below the quote.

Inline Code and Fenced Code Blocks

  • Inline code: wrap filenames, commands, or shortcuts in single backticks, such as `post.md`.
  • Code blocks: wrap multiple lines in triple backticks (```) and specify the language (markdown, bash, python, yaml) right after the opening fence for syntax highlighting:
```markdown
## Today's Note

- Write one paragraph.
- Proofread once.
```

If your code block itself contains triple backticks (as in Markdown tutorials), wrap the outer block in four backticks (````). Forgetting the closing fence turns the rest of your document into code.

Practice Now

Convert the first three lines into a numbered list, keep the blockquote, and inspect how the fenced code block renders.

Practice Now

Convert the first three lines into a numbered list (1. 2. 3.), keep the blockquote, and add a second line inside the code block.

Live Preview
Show hint

Use 1. 2. 3. for ordered steps, > for blockquotes, and triple backticks with markdown for the code block.

Runs locally in your browser (nothing is uploaded or auto-saved). Supports headings, paragraphs, lists, checklists, tables, blockquotes, code, emphasis, links, and local site images.

Source: CommonMark Lists, Quotes & Code.


In the Markdown 101 series:

Loading comments...