Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / HTML

cite: store a quotation or edit source

Record a source URL and add a visible link separately when readers need it.

Version: HTML Living Standard

Syntax

<blockquote cite="/origin.html">An original quotation.</blockquote>

The cite attribute supplies a source URL for a block quotation or an inline quotation. On insertion and deletion elements it can point to an explanation of the change. It is URL metadata, not a place for the author’s name or a formatted bibliography. Relative addresses are resolved against the document’s base URL.

The attribute does not automatically render a clickable citation or fetch and verify the source. Add an ordinary visible link when readers should be able to open it. The cite element is a different feature: it represents the title of a work, rather than being a generic container for a person’s name or a replacement for this URL attribute.

The example gives an original quotation a relative source address. It first counts zero links, then creates one explicitly from the resolved source URL. The browser test confirms both the absolute address and the new visible link without requesting the destination. The demonstration does not claim that the quoted source has been independently authenticated.

Examples

<!doctype html><meta charset="utf-8">
<blockquote cite="/origin.html">Small examples make one rule easier to inspect.</blockquote>
<output id="result"></output><script>
const quote = document.querySelector('blockquote');
const before = document.querySelectorAll('a').length;
const link = document.createElement('a'); link.href = quote.cite; link.textContent = 'Source';
quote.after(link);
document.querySelector('#result').textContent = 'source=' + quote.cite + '; linksBefore=' + before + '; linksAfter=' + document.querySelectorAll('a').length;
</script>

Result

source=https://knowledge.test/origin.html; linksBefore=0; linksAfter=1

The quotation is original fixture text; the source address is local and is not downloaded during the test.

Sources