CodeBlanks Logo Icon CodeBlanks

Quotations and sources

HTML course · Beginner · Lesson 11/68

Learn the difference between <blockquote>, <q> and <cite>.

What is the blockquote tag?

The <blockquote> tag carries long block quotations. It is used for quotes that are longer than a single paragraph and stand on their own. The browser shows it indented by default.

Inside it you usually place one or more <p> paragraphs. For example, a few sentences quoted from an article. For short quotes another tag is better; we will see it in the next step.

The q and cite tags

The <q> tag carries short inline quotations. Use it inside a sentence for a few words or a single sentence. The browser wraps it in quotation marks automatically.

<cite> carries the source of the quote (author, book, article title). It marks the title of a work. You can give a source inside <blockquote> or <q> with <cite>.

Citing a source with cite

It is a good habit to cite the source when you quote. You can add a <cite> inside a <blockquote> or <q> tag to give the author or the work's title.

Example: <blockquote><p>Knowledge is power.</p><cite>Francis Bacon</cite></blockquote>. <cite> carries only the work's title or author — not the quote itself.

Exercise Write a sourced quote

Add a <blockquote> to body. Inside it, write a <p> with Knowledge is power. Then give the source as Francis Bacon in a <cite>.

Show example solution
<body>
  <blockquote>
    <p>Knowledge is power.</p>
    <cite>Francis Bacon</cite>
  </blockquote>
</body>

Test yourself

  1. Which tag is used for a long, block-level quote?

    • <blockquote>
    • <q>
    • <cite>
    • <quote>
    Show answer

    <blockquote> — Correct. Long quotes go inside <blockquote>.

  2. Close the quote

    <blockquote>
      <p>Knowledge is power.</p>
    ____
    Show answer
    <blockquote>
      <p>Knowledge is power.</p>
    </blockquote>
  3. Match each tag to its role

    <blockquote>
    Block quote
    <q>
    Short inline quote
    <cite>
    Source / author
    <p>
    Paragraph
  4. Which tag is used for a short quote inside a sentence?

    • <blockquote>
    • <q>
    • <cite>
    • <short>
    Show answer

    <q> — Correct. Short inline quotes are written with <q>.

All lessons in Beginner