HTML cite Attribute

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 3 Examples
Semantics & Content

Introduction

The cite attribute in HTML is used to provide a reference or citation for the source of quoted content. It is commonly applied to elements that represent quoted or referenced text, such as <blockquote> and <q>. The attribute helps attribute content to its original source, adding credibility to the information presented.

What You’ll Learn

01

URL value

Source link.

02

blockquote

Block quotes.

03

q element

Inline quotes.

04

cite tag

Not same thing.

05

.cite

JS property.

06

del / ins

Edit sources.

Purpose of cite

The primary purpose of the cite attribute is to specify the source URL for quoted or referenced content within an HTML document. This helps users, search engines, and developers trace back the origin of the information. The value is machine-readable metadata—it is not shown on the page by default.

💡
cite attribute vs <cite> element

The cite attribute holds a URL on blockquote, q, etc. The <cite> element displays the title of a work (book, article, film) visibly to readers. Use both together when appropriate.

📝 Syntax

Add cite with a URL on a quoting element:

cite.html
<blockquote cite="https://www.example.com/article">
  This is a quoted text.
</blockquote>

Syntax Rules

  • Value must be a valid URL pointing to the cited source.
  • Valid on blockquote, q, del, and ins.
  • The attribute is not displayed; add visible attribution separately.
  • Use absolute URLs when the source is on another site.
  • Pair with <cite> in a footer for human-readable titles.

💎 Values

The cite attribute accepts a URL as its value, pointing to the location of the cited source. Here is a basic example:

cite-values.html
<blockquote cite="https://www.example.com/article">This is a quoted text.</blockquote>

In this example, the cite attribute contains the URL of the article from which the quoted text is taken. Book titles, author names, and publication names belong in visible content—typically inside a <cite> element—not in the attribute value.

⚡ Quick Reference

Elementcite PurposeVisible Attribution
<blockquote>URL of block quote source<footer> + <cite>
<q>URL of inline quote sourceLink or surrounding text
<del> / <ins>URL explaining the editRevision note if needed
<cite> elementN/A (not an attribute)Title of creative work
JS accesselement.citeRead or set URL string
Value typeURL onlyNot plain text titles

Applicable Elements

ElementSupported?Notes
<blockquote>YesMost common use for long quotations
<q>YesInline quotations
<del>YesCite source of deleted content
<ins>YesCite source of inserted content
<cite>NoThis is an element, not a target for the attribute
<a>NoUse href for links

Examples Gallery

Simple blockquote cite, blockquote with footer, and dynamic JavaScript cite property.

👀 Live Preview

Blockquote with visible footer attribution (cite attribute URL is not displayed):

This is a blockquote from a book.

— Author Name, Title of the Book

Simple cite URL

cite.html
<blockquote cite="https://www.example.com/article">
  This is a quoted text.
</blockquote>
Try It Yourself

Example

Let’s see how the cite attribute is used in a real-world example:

cite.html
<blockquote cite="https://www.example.com/book">
  <p>This is a blockquote from a book.</p>
  <footer>— Author Name, <cite>Title of the Book</cite></footer>
</blockquote>
Try It Yourself

How It Works

In this example, the cite attribute is applied to a <blockquote> element, indicating the URL source of the quoted content. Additionally, the <cite> element within the <footer> provides the visible title of the book for readers.

Dynamic Values with JavaScript

Similar to other HTML attributes, the cite attribute can be dynamically set using JavaScript when the source is determined at runtime:

cite.html
<blockquote id="dynamicBlockquote">
  "Learning HTML is fun!"
</blockquote>

<script>
  // Dynamically set the cite attribute for a blockquote
  document.getElementById("dynamicBlockquote").cite =
    "https://www.example.com/dynamic-source";
</script>
Try It Yourself

How It Works

In this script, the cite property is dynamically set for the <blockquote> with id dynamicBlockquote. This is useful when the cited source URL is determined during user interactions or from API data.

♿ Accessibility

  • Visible attribution matters — The cite attribute alone does not help screen reader users; provide clear footer text or links.
  • Use semantic quoting — Prefer blockquote and q over styled paragraphs for quotations.
  • Link to sources — Consider an visible <a href> alongside the hidden cite URL.
  • cite element for titles — The <cite> element names works in a standard, accessible way.
  • Do not rely on URL alone — Human-readable context improves comprehension for all users.

🧠 How cite Works

1

Author adds quoted content

Wrap text in blockquote or q and set cite to a source URL.

Markup
2

Browser stores metadata

The URL is associated with the element but not rendered by default.

Metadata
3

Visible attribution added

Footer text and <cite> show readers where the quote came from.

Display
=

Credible quoted content

Machines get the URL; humans get readable attribution.

Browser Support

The cite attribute is universally supported on blockquote, q, del, and ins in all modern browsers.

HTML standard · Semantic

Supported everywhere

The cite attribute and cite DOM property work consistently across browsers.

100% Modern browsers
Google Chrome Full support
Supported
Mozilla Firefox Full support
Supported
Apple Safari Full support
Supported
Microsoft Edge Full support
Supported
cite attribute Universal

Bottom line: Use cite confidently on quoting elements in all HTML5 projects.

💡 Best Practices

✅ Do

  • Use cite when quoting or referencing external content
  • Provide a valid, reachable source URL
  • Add visible attribution with footer and <cite>
  • Use on del and ins for edit provenance
  • Set dynamically with element.cite when needed

❌ Don’t

  • Put book titles in the cite attribute value
  • Confuse cite attribute with <cite> element
  • Expect the URL to appear without extra markup
  • Cite unreliable or broken source links
  • Use cite on non-quoting elements like <p>
  • Use the cite attribute when quoting or referencing content to provide proper attribution and enhance the credibility of your document.
  • Ensure that the value of the cite attribute is a valid URL pointing to the original source.
  • Utilize the <cite> element within the <footer> or alongside the quoted content to provide additional visible context, such as the title of a book or the name of an author.

Conclusion

The cite attribute is a valuable tool for indicating the source of quoted or referenced content in HTML documents. Combined with visible <cite> elements and footers, it supports transparent, credible publishing.

By using this attribute appropriately, you contribute to the transparency and reliability of information presented on your web pages.

Key Takeaways

Knowledge Unlocked

Five truths every developer should know about cite

Bookmark these before adding quotations to HTML.

5
Core concepts
💬 02

blockquote

Block quotes.

Element
📝 03

cite tag

Visible title.

Compare
⚙️ 04

.cite

JS property.

Script
👁️ 05

Hidden

Add footer.

A11y

❓ Frequently Asked Questions

It provides a URL pointing to the source of quoted, deleted, or inserted content.
No. The attribute holds a URL on quoting elements. The <cite> element displays a work title visibly.
No. The attribute value must be a URL. Put the book title inside a <cite> element in visible content.
Not by default. Add a footer, link, or <cite> element for visible attribution.
Assign element.cite = "https://example.com/source" or use setAttribute("cite", url).
blockquote, q, del, and ins.

Reference quoted content sources

Practice the cite attribute on blockquotes with URL sources, visible footers, and dynamic JavaScript updates.

Try blockquote example →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful