How to quote text in Markdown
Try it - edit the markdown and watch the preview
Visual
A blockquote is a greater-than sign at the start of the line:
> Everything on this line is quoted.
Consecutive quoted lines join into one block, so a long quotation can be hard-wrapped in the source without breaking apart in the output.
Multiple paragraphs
The blank line between two quoted paragraphs needs its own >:
> First paragraph.
>
> Second paragraph.
Leave that marker off and the quote ends at the blank line: the second paragraph becomes ordinary body text. This is the most common problem people hit with quotes.
Nesting
Double the marker to nest, and keep going for deeper levels:
> Outer quote
>> Reply to it
>>> Reply to the reply
Quotes hold other Markdown
Lists, code blocks, links, emphasis and headings all work inside a quote. A common pattern is a callout: a bolded label followed by a sentence or two:
> **Note**: this behavior changed in version 2.
Markdown itself has no dedicated callout syntax, so a bolded blockquote is the portable way to write one.
Note and warning boxes: GitHub alerts
GitHub added a syntax for callouts in 2023, and it is a blockquote with a marker on its first line:
> [!NOTE]
> Useful information a reader should notice even when skimming.
> [!WARNING]
> Urgent information that needs immediate attention.
There are five kinds - NOTE, TIP, IMPORTANT, WARNING and CAUTION -
and the marker has to be the first line of the quote, in capitals, on its own.
The demo at the top of this page renders all five, and so does GitHub.
The catch is portability. This is not CommonMark and it is not in the GitHub Flavored Markdown specification either; it is a GitHub feature that a handful of other renderers have since copied. Anywhere that does not know it, the marker appears as literal text at the top of an ordinary quote. Obsidian has its own near-identical version with a different set of names.
So: use alerts in a README, where GitHub is the audience. For a document that has to survive being pasted somewhere unknown, a bolded label inside a plain quote still reads correctly everywhere.
Common questions
- How do I quote a block of text?
- Put a greater-than sign and a space at the start of the line. Everything on that line becomes part of the quote, and consecutive quoted lines join into a single block.
- How do I write a quote with more than one paragraph?
- Put a > on the blank line between paragraphs too. A truly empty line ends the quote, so the marker is what holds the two paragraphs together in one block.
- Do I need a > on every line?
- Not strictly: lazy continuation means an unmarked line following a quoted one usually gets absorbed into it. Marking every line is clearer and behaves consistently across renderers, so it is worth the habit.
- Can I put other Markdown inside a quote?
- Yes. Lists, headings, code blocks, links and emphasis all work inside a blockquote, and nested quotes work by doubling the marker to >>.
- What is the difference between a blockquote and a code block?
- A blockquote is prose that gets styled as a quotation and stays fully formatted. A code block is verbatim text where Markdown syntax is deliberately not interpreted. Use a quote for words and a code block for anything that must survive unchanged.
- How do I make a note or warning box in Markdown?
- Start a blockquote with a marker on its own line: > [!NOTE], then write the note on the lines below it. GitHub calls these alerts and supports five kinds: NOTE, TIP, IMPORTANT, WARNING and CAUTION. The demo above renders them, and so does GitHub. Anywhere else the marker shows as literal text inside an ordinary quote, so for documents that have to travel, a bolded label is still the safer choice.