Skip to content

<q> - The Inline Quotation Element

Inline HTML 4.0

The inline quotation element represents a short quotation that doesn’t require paragraph breaks. Browsers automatically add quotation marks around the content.

Result
<q>quoted text</q>

Browsers automatically add appropriate quotation marks based on the language setting.

AttributeDescriptionExample
citeURL to the source of the quotationcite="https://example.com/source"
Result
Result
Result
Result
Result

The browser handles nested quotes correctly:

Result
<!-- Short inline quotations -->
<p>He said, <q>I'll be right back.</q></p>

Use for quotes within running text.

Browsers add quotes automatically based on language:

Result

Combine with <cite> for source attribution:

Result

Customize the quotation appearance:

Result
Result
Result
Result
Result
Result
<!-- Don't use <q> for emphasis -->
<p>This is <q>very important</q>.</p>
<!-- Browser adds quotes -->
<p>He said, <q>Hello!</q></p>

Results in: He said, “Hello!”

Screen readers may announce quotations with appropriate intonation, helping convey the quoted nature of the text.

When possible, include attribution:

<p><q>Knowledge is power.</q></p>

The cite attribute provides machine-readable source information:

<p>
According to the article,
<q cite="https://example.com/article">climate change is accelerating</q>.
</p>

Different languages use different quotation styles:

Result
BrowserVersionNotes
Chrome1+Full support
Firefox1+Full support
Safari4+Full support
Edge12+Full support
IE8+Full support

The <q> element has excellent browser support. Automatic quotation marks are supported in all modern browsers.