Blockquotes
A blockquote marks a stretch of text as coming from somewhere else: an excerpt from a specification, a warning from an upstream document, a reviewer’s remark, a line somebody said in a meeting. On the page it usually gets a vertical rule or a tinted background that separates it from your own prose, and that visual separation is the whole point of the element.
What makes a blockquote harder than it looks is that it has no closing marker. Unlike a code fence, there is no end-of-quote token; the block simply continues until a line that does not begin with >. Everything else about the element follows from that: how a paragraph ends inside the quote, why a line you forgot to mark can be swallowed by the quote, and why a list inside a quote has to carry the marker on every single line.
Put a > at the very start of a line and the rest of the line becomes the quoted text. The space after the marker is optional:
> This is a quotation
<blockquote>
<p>This is a quotation</p>
</blockquote>
A blockquote can interrupt a paragraph, but only when it starts on a line of its own; the body text and the quote then become two separate blocks. The block ends at the first line that does not begin with >, and a blank line does not end it either, as long as the line after the blank line starts with > again. The one exception is lazy continuation: when the first line of the quote is a paragraph, a following line that carries no > is pulled into that paragraph.
> The first paragraph of the quote
this line has no marker and still belongs to the quote
<blockquote>
<p>The first paragraph of the quote
this line has no marker and still belongs to the quote</p>
</blockquote>
Lazy continuation makes long quotations easier to type, and it is also the reason a quote sometimes ends later than you expect.
A quote holds one paragraph by default. To put a second paragraph inside it, write an empty quote line — a line with nothing but > — between the two:
> The first paragraph of the quote.
>
> The second paragraph of the quote.
The result is a single <blockquote> holding two <p> elements. Without that empty quote line the two lines would be one paragraph with a soft line break, and a soft line break is not a break at all: it joins the lines into a single line of output.
Anything that can appear at the top level of a document can appear inside a quote, as long as every line carries the prefix. A list inside a quote therefore looks like > - item on every item, and the blank line between the quote’s blocks is a bare > rather than a truly empty line:
> Example:
>
> - first item
>
> ```js
> const answer = 42;
> ```
The result is a <blockquote> holding a paragraph, a <ul> with one item, and a <pre><code> block that keeps its language class. The code fence keeps its own language marker, and the fence lines carry the > prefix like everything else. Forgetting the prefix on a single line of a quoted list is the classic way to produce a list that half sits inside the quote and half escapes it.
Two markers on one line open two levels of quote, so a quotation inside a quotation is written with >>:
>> A nested quotation
The result is two <blockquote> elements, one inside the other. To nest exactly one level inside an existing quote, add a second > separated by a space, which reads more clearly than stacking the markers:
> The outer quote.
> > The inner quote.
The result here is a <blockquote> holding a paragraph and a second <blockquote> inside it.
Three different things look similar on the page and mean different things, so the choice of element is a claim about where the words came from. Quoting someone verbatim belongs in a blockquote, and the source should be visible either inside the quote or in the sentence that introduces it. Relaying somebody’s opinion in your own words does not belong in a blockquote at all: the blockquote is a promise that the words inside are the original ones, so a paraphrase has to be an ordinary paragraph with an attribution in the running text. A callout for the reader — a tip, a warning, a note about a corner case — is the third case, and here the blockquote is the wrong tool precisely because the material comes from you and not from elsewhere, so use the callout styling your platform provides instead.
| Written as | Actually renders as | Why |
|---|---|---|
> quote | a blockquote | the base form |
> on a line by itself | a paragraph break inside the quote | an empty quote line separates paragraphs |
| a quoted list with one unmarked line | that line leaves the quote | every line needs the prefix |
A blockquote ends later than you expect. The block runs until the first line that does not start with >, so a line you forgot to mark is swallowed by the quote and reads as if it were part of the quotation. The same thing happens with a blank line: an unmarked blank line ends the block, whereas a > line keeps it open. Write long quotations top to bottom, adding the prefix to every line as you go, rather than writing the text first and adding the markers afterwards. A quotation that has eaten the paragraph after it is far harder to spot than a quotation with a missing marker.
Rewrite the following plain text as Markdown. The first line is body text and must stay outside any quote. The three lines that follow are one quotation of two paragraphs, separated by an empty quote line, and the line after them is body text again. The last two lines are an outer quotation with a single quotation nested inside it.
This line is body text.
> The first paragraph of the quote.
>
> The second paragraph of the quote.
This line is body text again.
> The outer quote.
> > The inner quote.
Approach:
A blockquote runs until a line without the > prefix, so the body lines stay outside the quote simply by carrying no marker. The two paragraphs inside the quotation are separated by an empty quote line, a line holding nothing but >. The nested quotation adds a second marker separated by a space, which puts one quote inside the other instead of two levels deep.
Steps:
- Leave the two body lines exactly as they are, with a blank line on each side, so that the quote cannot swallow them.
- Mark every line of the quotation with
>, and write a line containing only>between the first paragraph and the second. - Write the outer quote as
> The outer quote.and the inner one as> > The inner quote., then check that the result is two body paragraphs, one quote holding two paragraphs, and a final quote holding a second quote inside it.
Answer:
This line is body text.
> The first paragraph of the quote.
>
> The second paragraph of the quote.
This line is body text again.
> The outer quote.
>
> > The inner quote.You can now write a blockquote and you know that it has no closing marker: it runs until the first line that does not begin with >, and an empty quote line is what separates one paragraph of the quote from the next. You know that every line of a quoted list or quoted code block needs the prefix, that a missing prefix is silently swallowed by lazy continuation, and that nesting is done with a second > separated by a space. You also know that a blockquote is a claim about provenance, so a paraphrase or a callout belongs in ordinary prose instead. The next page covers the task list, a GFM extension built on top of the list syntax, where the brackets have to sit directly after the marker.
