CKTIS / HTML
q — inline quotation
The q element marks text quoted from another source, including a fictional one. The browser supplies quotation marks, while the optional cite attribute identifies the source URL without replacing a visible link.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
<q>quoted text</q>
<q cite="source-url">quoted text</q>The q element represents a quotation from another source within text; the source can be fictional, such as a character's speech. It is allowed where phrasing content is expected and can contain phrasing content, including nested q elements. Both tags are required.
Do not write quotation marks enclosing the quotation inside q or immediately before or after it: the browser supplies them. Their appearance can vary. Do not use q merely to indicate sarcasm or distinguish a word being discussed. Marking quotations with q is optional; plain text with explicit quotation marks is also valid.
The optional cite attribute takes a valid source URL, potentially surrounded by spaces. Do not assume it provides readers with a visible link; add one separately when needed. The cite attribute identifies the quotation's source, whereas the cite element marks a work's title.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>Quotation example</title>
<p>Mira said <q>Start small.</q></p>
</html>Result
Mira said “Start small.”
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.