Skip to content
All referenceStructure

Markdown Indent

Learn how to indent text in markdown for nested lists, blockquotes, and code. Syntax, platform support, and common mistakes.

What is markdown indent?

Markdown uses indentation (spaces or tabs) to nest content inside lists and blockquotes. Standard markdown doesn't support arbitrary text indentation — indent is functional, not decorative. Use 2-4 spaces to nest list items and blockquote continuations.

Syntax

Nested list

Indent with 2 spaces to nest a list item under its parent.

Result
  • Item one
    • Nested item
      • Deeply nested

Code block (indent)

Indent by 4 spaces to create a code block (alternative to fenced blocks).

Result
const x = 42
console.log(x)

Blockquote continuation

Use > on blank lines to continue a blockquote across paragraphs.

Result

First paragraph

Second paragraph

Platform support

PlatformSupportedNotes
GitHubYesNested lists, code indent, blockquotes
GitLabYes
DiscordPartialNo nested lists or indent-based code
SlackPartialLimited nesting support
RedditYes
Stack OverflowYes
NotionYesTab key to indent list items
ObsidianYes

Common mistakes

Wrong
-Item one
 -Nested
Right
- Item one
  - Nested

Use consistent indentation (2 or 4 spaces) and a space after the dash. The indent must align with the parent's content.

Wrong
   Indented text
Right
> Indented text

Markdown doesn't support arbitrary indentation for plain text. Use a blockquote (>) or a list to indent visually.

Tips for indent

1Be consistent with spacing

Pick either 2-space or 4-space indentation and stick with it throughout the document.

2Use fenced code blocks instead

The 4-space indent code block is easy to confuse with nested lists. Prefer ``` fenced blocks for code.

3Indent isn't visual indentation

Markdown indent is structural — it nests list items and creates code blocks. For visual indentation of text, use blockquotes or HTML.

Frequently asked questions

Everything you need to know.

1

How do I indent text in markdown?

Markdown doesn't support arbitrary indentation. To indent, use nested lists (2 spaces + -), blockquotes (>), or code blocks (4 spaces or ```).

Related elements

Try it in the editor

Paste your markdown and see indent rendered instantly with professional themes.