🚀 LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Exercises.
🎓 COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.
REFERENCEhtml

html Documentation

LOADING ENGINE...

<cite>

AI & DATA SCIENCE // cite-tag

The <cite> element marks the title of a creative work — a book, song, movie, research paper, or similar — and is rendered in italics by default.

Syntax

My favorite book is <cite>Dune</cite> by Frank Herbert.

Deep Dive Course

**`<cite>`** is specifically for referencing the **title** of a work, not the quotation itself and not the author's name. For example, in 'As Frank Herbert wrote in <cite>Dune</cite>, "..."', the `<cite>` wraps only the book title 'Dune', while the actual quoted text would use `<q>` or `<blockquote>`. It's a narrow, specific-purpose element — don't reach for it as a generic italics tag.

1Understanding <cite>

`<cite>` is specifically for referencing the title of a work, not the quotation itself and not the author's name. For example, in 'As Frank Herbert wrote in <cite>Dune</cite>, "..."', the <cite> wraps only the book title 'Dune', while the actual quoted text would use <q> or <blockquote>. It's a narrow, specific-purpose element — don't reach for it as a generic italics tag.

💡

A common mistake is wrapping a person's name in <cite> to credit a quote — <cite> is for the TITLE of the work, not the author.

editor.html
<p>The movie <cite>Inception</cite> was directed by Christopher Nolan.</p>
localhost:3000

2Practical Example

Here is a real-world application of <cite> showing how it is used in production HTML.

editor.html
<!-- Citing a work alongside a quotation -->
<blockquote>
  <p>"All happy families are alike."</p>
  <footer>— Leo Tolstoy, <cite>Anna Karenina</cite></footer>
</blockquote>
localhost:3000

3Best Practices

Follow these guidelines when working with <cite>:

1. Use <cite> only for titles of works (books, films, songs, articles, papers)

2. Don't use <cite> to credit the author/speaker of a quote — that's just plain text or a <footer> in a <blockquote>

3. Combine with <blockquote> or <q> when citing an actual passage from the work

⚠️

Tip: A common mistake is wrapping a person's name in <cite> to credit a quote — <cite> is for the TITLE of the work, not the author.

editor.html
<p>The movie <cite>Inception</cite> was directed by Christopher Nolan.</p>
localhost:3000

Examples

Example 01Basic Usage
<p>The movie <cite>Inception</cite> was directed by Christopher Nolan.</p>
Example 02Advanced Example
<!-- Citing a work alongside a quotation -->
<blockquote>
  <p>"All happy families are alike."</p>
  <footer>— Leo Tolstoy, <cite>Anna Karenina</cite></footer>
</blockquote>

Best Practices

  • Use only for titles of works (books, films, songs, articles, papers)
  • Don't use to credit the author/speaker of a quote — that's just plain text or a
    in a
  • Combine with
    or when citing an actual passage from the work

Interview Question

Should <cite> wrap the name of the person being quoted?

Hint: Think about what <cite> is defined to represent in the HTML spec.

No — the HTML spec defines <cite> as the title of a work, not the name of its author or the quote itself. To credit 'Leo Tolstoy, Anna Karenina', only 'Anna Karenina' (the title) should be wrapped in <cite>; the author's name is just plain text, often placed inside a <footer> within a <blockquote>.

Exercises

EasyPractice using <cite> in a real scenario.
View Solution
<p>The movie <cite>Inception</cite> was directed by Christopher Nolan.</p>

Frequently Asked Questions

Should <cite> wrap the name of the person being quoted?

No — the HTML spec defines as the title of a work, not the name of its author or the quote itself. To credit 'Leo Tolstoy, Anna Karenina', only 'Anna Karenina' (the title) should be wrapped in ; the author's name is just plain text, often placed inside a

within a
.

Related Functions

blockquote-tagq-tagi-tag