Quotes in HTML: blockquote, q and cite Explained

November 11, 2026 · 11 min read

Quotes in HTML: The blockquote, q, and cite Tags Explained

Quotes in HTML use three main elements. <blockquote> marks a passage set apart as its own block, <q> marks a short quotation inside a sentence, and <cite> marks the title of the quoted work. The attribution sits outside the quote, and the quotation marks themselves can be typed directly or written as character entities.

Which Tags Do You Use for Quotes in HTML?

Quotations in HTML use four pieces of markup once you count the figure wrapper for attribution. Each one has a single job, and mixing them up is the most common error in quote markup.

MarkupWhat it marksDefault display
<blockquote>A quotation of a paragraph or more, set apart from the textIndented 40px on both sides
<q>A short quotation inside a running sentenceThe browser adds quotation marks
<cite>The title of a work: a book, speech, film, article or songItalic
<figure> with <figcaption>A wrapper that ties a quotation to its visible attributionIndented like a blockquote

Don't confuse the cite attribute with the <cite> element. The attribute holds a URL for the source and sits on <blockquote> or <q>. The element wraps a title that readers actually see on the page.

How Do You Use Block Quotes in HTML?

Wrap the quoted passage in <blockquote> and put the text inside paragraph elements. The element accepts any flow content, so it can hold several paragraphs, a list or even a heading when the source has one.

<blockquote cite="https://example.com/gettysburg-address">
  <p>Four score and seven years ago our fathers brought forth on this
  continent, a new nation, conceived in Liberty, and dedicated to the
  proposition that all men are created equal.</p>
  <p>Now we are engaged in a great civil war, testing whether that nation,
  or any nation so conceived and so dedicated, can long endure.</p>
</blockquote>

This renders as two paragraphs indented from the left and right edges. The default style sheet in the HTML standard gives the element a 40px inline margin and a 1em margin above and below. You don't add quotation marks around a block quote, because the indentation already signals it. MLA, APA and Chicago agree, as our block quote format guide explains.

The cite attribute must be a valid URL. Browsers don't display it, and the WHATWG blockquote definition says it's mainly for scripts that gather data about quotations, not for readers. That's the honest limitation of the attribute: if you want people to see the source, write it out in visible text as well.

Inline Quotations With the q Element

For an HTML quotation that runs inside a sentence, use <q>. The browser inserts the opening and closing marks itself. The WHATWG q definition says quotation punctuation must not appear inside the element or right before and after it.

<p>Lincoln ended by resolving that <q>government of the people, by the
people, for the people, shall not perish from the earth</q>.</p>

On an English page this displays as: Lincoln ended by resolving that “government of the people, by the people, for the people, shall not perish from the earth”.

If you type marks inside the element anyway, you get doubled marks on screen, like ““this””. It's the easiest mistake to make with inline quotations.

Nesting works without extra effort. Put one <q> inside another and the browser switches to the next pair of marks.

<p>The essay notes that <q>Lincoln mentions <q>a new nation</q> in his
first sentence</q>.</p>

In English, that renders as: The essay notes that “Lincoln mentions ‘a new nation’ in his first sentence”. The marks follow the language inherited from the nearest lang attribute, so the same element picks different characters in a French passage:

<p lang="fr">Il a répondu <q>pas encore</q>.</p>

Current browsers typically display that phrase between guillemets (« ») rather than English curly quotes. Browsers draw these marks as CSS generated content, and the quotes property picks the characters. Changing how they look is a styling job rather than a markup one. Our guide to CSS quotation marks covers that property.

Where Does the Attribution Go: cite or figcaption?

Two rules settle most attribution questions. The attribution belongs outside the blockquote, because the speaker's name isn't part of what they said. And <cite> holds the title of a work. The HTML standard says outright that a person's name isn't one.

The simplest pattern puts the attribution in a paragraph right after the quote:

<blockquote>
  <p>The world will little note, nor long remember what we say here, but
  it can never forget what they did here.</p>
</blockquote>
<p>Abraham Lincoln, <cite>Gettysburg Address</cite>, 1863</p>

The sturdier pattern wraps both in a figure, so the caption is tied to the quotation in the markup itself:

<figure>
  <blockquote>
    <p>The world will little note, nor long remember what we say here,
    but it can never forget what they did here.</p>
  </blockquote>
  <figcaption>Abraham Lincoln, <cite>Gettysburg Address</cite>,
  November 19, 1863</figcaption>
</figure>

We prefer the figure version whenever a quote has a visible credit line. The relationship survives redesigns, and the figcaption stays attached when you move the block around a page. One of our blockquote CSS designs styles exactly this figure markup.

Here is the pattern to avoid, which still circulates in tutorials:

<blockquote>
  <p>Four score and seven years ago...</p>
  <cite>Abraham Lincoln</cite>
</blockquote>

It breaks both rules at once. The credit sits inside the quote, and <cite> wraps a person instead of a title.

Why Use Quote Tags When Quotation Marks Will Do?

For short inline quotations, typed marks are fine. The HTML standard calls the <q> element entirely optional and says explicit quotation punctuation without it is just as correct. Use <q> when you want the browser to pick language-correct marks, or when a script needs to find quotations in your markup.

The block element matters more. The blockquote HTML element carries the implicit ARIA role blockquote, and some screen readers announce where a block quote starts and ends. An indented <div> looks the same but tells assistive technology nothing. Don't count on <q> being announced at all.

Keep quote markup for actual quotations. Scare quotes, irony, words used as words and the titles of short works aren't quotations, so type the marks for those. Likewise, don't use <blockquote> just to indent a note or a warning box.

Quotation Mark Entities Like &quot; and &ldquo;

Most of the time you can type quotation marks directly. A UTF-8 page, which is the encoding the HTML standard expects, handles curly quotes without any escaping. Entities help when your keyboard, CMS or build tool mangles curly quotes, or when a character would end an attribute value early.

CharacterNamed referenceDecimalDescription
"&quot;&#34;Straight double quote, U+0022
'&apos;&#39;Straight apostrophe, U+0027
“&ldquo;&#8220;Left double quote, U+201C
”&rdquo;&#8221;Right double quote, U+201D
‘&lsquo;&#8216;Left single quote, U+2018
’&rsquo;&#8217;Right single quote and typographic apostrophe, U+2019
«&laquo;&#171;Left guillemet, U+00AB
»&raquo;&#187;Right guillemet, U+00BB
„&bdquo;&#8222;Low double quote, used to open quotes in German, U+201E
‚&sbquo;&#8218;Low single quote, U+201A

Hexadecimal references work too, such as &#x201C; for the left double quote. The full list lives in the WHATWG named character references table.

So what's the difference between &quot; and <q>? The entity is just one character, a straight double quote, identical to typing it. The element is a piece of markup that says the text is a quotation, and the browser draws curly marks around it. In ordinary text you never need &quot;, since a typed straight quote is valid there.

One historical note: &apos; wasn't defined in HTML 4, which is why older code reaches for &#39; instead. If you're showing these characters in Markdown rather than HTML, our guide to escaping Markdown symbols covers that side.

Single vs Double Quotes in HTML Attribute Values

The other meaning of an HTML quote is the pair of marks around an attribute value. The HTML syntax allows three forms, and all three are valid:

<input value="double-quoted">
<input value='single-quoted'>
<input value=unquoted>

Each form forbids one thing. A double-quoted value can't contain a literal ", and a single-quoted value can't contain a literal '. An unquoted value can't contain spaces, either quote mark, =, <, > or a backtick, and it can't be empty.

To put one kind of quote inside a value, wrap it in the other kind or escape it:

<p title='She said "yes"'>Hover me</p>
<p title="She said &quot;yes&quot;">Hover me</p>
<p title="It's fine">Hover me</p>
<p title='It&#39;s fine'>Hover me</p>

The first two tooltips both read: She said "yes". The last two both read: It's fine. Our habit is double quotes everywhere, with &quot; for the rare value that needs one. Unquoted values pass validation, but they break the moment someone edits the value and adds a space.

From Markdown > to the HTML blockquote Element

If you write in Markdown, you rarely type these tags by hand. A line that starts with > compiles to <blockquote>, and each paragraph inside it becomes a <p>. The CommonMark spec defines this, and GitHub Flavored Markdown follows it. Our Markdown blockquote guide covers nesting and platform quirks.

> The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract.
>
> The world will little note, nor long remember what we say here, but it can never forget what they did here.

Abraham Lincoln, Gettysburg Address, 1863

That converts to a <blockquote> holding two <p> elements, followed by a separate <p> for the credit line. The blank line keeps the attribution outside the quote, which is exactly where the HTML standard wants it. Markdown has no syntax for an inline <q>, so you either write the raw tag or type curly marks.

Try it below. Click Export HTML, and the right pane shows the HTML output with the blockquote and its two paragraphs.

Lincoln paid tribute to the fallen soldiers in these lines:

The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract.

The world will little note, nor long remember what we say here, but it can never forget what they did here.

Abraham Lincoln, Gettysburg Address, 1863

The credit line stays outside the quote because of the blank line above it.

74 words411 characters9 lines
Markdown

Going the other way loses something. The HTML to Markdown converter uses the turndown library, and in our test turndown turned He said <q>yes</q> into He said yes, with no marks. The browser generated those marks, so they were never in the text. Type them back in after converting.

Getting quotes in HTML right comes down to a few habits. Use blockquote for passages, q for short inline quotations and cite for titles, and keep the attribution outside the quote. Type curly marks or reach for entities when a tool mangles them, and put attribute values in double quotes. Draft the text in Markdown, then turn it into clean markup with the Markdown to HTML converter or in the editor.