HTML Quotations
Quoting other people, abbreviations, addresses and titles of works are all common on the web. HTML has a dedicated element for each, so browsers, search engines and screen readers know exactly what they are looking at.
Short quotes with <q>
<q> marks a short quotation that sits inside a sentence. Browsers add the quotation marks automatically — and use the right style for the page's language.
<p>My grandmother always said <q>never trust a cat with a plan</q>.</p>
<p lang="de">Sie sagte <q>Guten Morgen</q> und ging.</p>Note: Don't type your own quotation marks around a
<q>— you'll end up with doubles.
Long quotes with <blockquote>
<blockquote> is for longer quotations that stand on their own as a block. Browsers indent them by default. The optional cite attribute holds the URL of the source (it isn't displayed, but tools can read it).
<p>From the project's mission statement:</p>
<blockquote cite="https://example.com/mission">
<p>We believe everyone should be able to learn to code for free,
in their own browser, without installing anything.</p>
</blockquote>
<p>— ExcelTAD team</p>Titles of works with <cite>
<cite> marks the title of a creative work: a book, film, song, painting, game. It is usually shown in italics.
<p>My favourite novel is <cite>The Left Hand of Darkness</cite>.</p>
<p>We watched <cite>Spirited Away</cite> on Friday.</p>Use <cite> for the work's title, not for the person's name.
Abbreviations with <abbr>
<abbr> marks an abbreviation or acronym. Put the full form in the title attribute; most browsers show it as a tooltip on hover and draw a dotted underline.
<p>The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.</p>
<p>Pages are written in <abbr title="HyperText Markup Language">HTML</abbr>
and styled with <abbr title="Cascading Style Sheets">CSS</abbr>.</p>Contact information with <address>
<address> holds contact details for the author or owner of a page or article — an email, phone number, postal address or social link. It usually renders in italics, and it keeps its own line breaks only where you add <br>.
<address>
Written by <a href="mailto:hello@example.com">Mai Tran</a>.<br>
Studio 4, 99 Harbour Road<br>
Da Nang, Vietnam
</address>Text direction with <bdo>
<bdo> (bi-directional override) forces a direction for its text. dir="rtl" writes right-to-left, which can be useful when demonstrating or embedding text from right-to-left languages.
<p><bdo dir="rtl">This sentence is written backwards.</bdo></p>Paste it into any playground above to see the reversed text.
Quotation elements at a glance
| Element | Use it for | Default look |
|---|---|---|
<q> |
Short inline quotation | Adds quote marks |
<blockquote> |
Long standalone quotation | Indented block |
<cite> |
Title of a work | Italic |
<abbr> |
Abbreviation; full form in title |
Dotted underline (varies) |
<address> |
Contact information | Italic |
<bdo> |
Override text direction | Reversed when dir="rtl" |
Tip: The first time you use an abbreviation on a page, also spell it out in the text — tooltips don't appear on touchscreens.
Test yourself
Which element is best for a quotation of several sentences shown as its own block?
<q><cite><blockquote><quote>
Where do you put the full form of an abbreviation in <abbr>?
- In the
titleattribute - In the
altattribute - In the
citeattribute - Between the tags
What should <cite> contain?
- The author's name
- A URL
- The title of a creative work
- A long quotation