Text Content

HTML <q> element

Marks a short inline quotation. Browsers normally supply quotation punctuation, so do not add it manually as part of the markup. Use cite for a source URL when useful and visible attribution for readers. Quotation punctuation is typically supplied by the browser and varies with language and CSS quotes rules. It accepts global HTML attributes; individual global features may be inapplicable or restricted.

Formal Syntax & Structure

html syntaxhtml
<q>Quoted text</q>

Parameters & Attributes

NameTypeDescription
citeURLPoints to the source of a quotation or the explanation of an edit. Browsers generally do not display this URL automatically; provide visible attribution when helpful.

Return Value

HTMLQuoteElement

Content model: Phrasing content, with element-specific restrictions.

Working Example

Example Snippethtml
<!doctype html><html lang="en">  <head>    <meta charset="utf-8">    <title>HTML example</title>  </head>  <body>    <p>      She said      <q>Keep reading.</q>    </p>  </body></html>
HTML Reference