👀 Live Preview
Blockquote with visible footer attribution (cite attribute URL is not displayed):
This is a blockquote from a book.

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.
Source link.
Block quotes.
Inline quotes.
Not same thing.
JS property.
Edit sources.
citeThe 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.
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.
Add cite with a URL on a quoting element:
<blockquote cite="https://www.example.com/article">
This is a quoted text.
</blockquote>blockquote, q, del, and ins.<cite> in a footer for human-readable titles.The cite attribute accepts a URL as its value, pointing to the location of the cited source. Here is a basic example:
<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.
| Element | cite Purpose | Visible Attribution |
|---|---|---|
<blockquote> | URL of block quote source | <footer> + <cite> |
<q> | URL of inline quote source | Link or surrounding text |
<del> / <ins> | URL explaining the edit | Revision note if needed |
<cite> element | N/A (not an attribute) | Title of creative work |
| JS access | element.cite | Read or set URL string |
| Value type | URL only | Not plain text titles |
| Element | Supported? | Notes |
|---|---|---|
<blockquote> | Yes | Most common use for long quotations |
<q> | Yes | Inline quotations |
<del> | Yes | Cite source of deleted content |
<ins> | Yes | Cite source of inserted content |
<cite> | No | This is an element, not a target for the attribute |
<a> | No | Use href for links |
Simple blockquote cite, blockquote with footer, and dynamic JavaScript cite property.
Blockquote with visible footer attribution (cite attribute URL is not displayed):
This is a blockquote from a book.
<blockquote cite="https://www.example.com/article">
This is a quoted text.
</blockquote>Let’s see how the cite attribute is used in a real-world example:
<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>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.
Similar to other HTML attributes, the cite attribute can be dynamically set using JavaScript when the source is determined at runtime:
<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>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.
blockquote and q over styled paragraphs for quotations.<a href> alongside the hidden cite URL.<cite> element names works in a standard, accessible way.Wrap text in blockquote or q and set cite to a source URL.
The URL is associated with the element but not rendered by default.
Footer text and <cite> show readers where the quote came from.
Machines get the URL; humans get readable attribution.
The cite attribute is universally supported on blockquote, q, del, and ins in all modern browsers.
The cite attribute and cite DOM property work consistently across browsers.
Bottom line: Use cite confidently on quoting elements in all HTML5 projects.
<cite>del and ins for edit provenanceelement.cite when needed<cite> element<p>cite attribute when quoting or referencing content to provide proper attribution and enhance the credibility of your document.cite attribute is a valid URL pointing to the original source.<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.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.
citeBookmark these before adding quotations to HTML.
Source link.
SyntaxBlock quotes.
ElementVisible title.
CompareJS property.
ScriptAdd footer.
A11y<cite> element displays a work title visibly.<cite> element in visible content.<cite> element for visible attribution.element.cite = "https://example.com/source" or use setAttribute("cite", url).blockquote, q, del, and ins.Practice the cite attribute on blockquotes with URL sources, visible footers, and dynamic JavaScript updates.
5 people found this page helpful