TExcelTAD
Home › HTML › HTML Quotations

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.

html · try it yourself
<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).

html · try it yourself
<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.

html · try it yourself
<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.

html · try it yourself
<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>.

html · try it yourself
<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.

html
<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?

  1. <q>
  2. <cite>
  3. <blockquote>
  4. <quote>

Where do you put the full form of an abbreviation in <abbr>?

  1. In the title attribute
  2. In the alt attribute
  3. In the cite attribute
  4. Between the tags

What should <cite> contain?

  1. The author's name
  2. A URL
  3. The title of a creative work
  4. A long quotation