The <q> element marks a short inline quotation inside a sentence or paragraph. Most browsers surround the text with quotation marks automatically.
Optional cite holds a URL for the source document. For longer, stand-alone quotations, use <blockquote>. To name a book, song, or other work, use <cite> (the element — different from the cite attribute).
Baseline · Widely available.
Not deprecated. Stable across browsers since about July 2015 (and much earlier in practice).
Do not type your own quote marks inside <q>.
The browser inserts them. Adding " or ‘ yourself often doubles the marks on screen.
Note.
The cite URL is not shown as a clickable link by default. Put a visible credit in the surrounding text when readers need it.
Syntax
HTML Syntax
syntax.html
<q>quote text</q>
Both start and end tags are required. Content is phrasing content. Nest another <q> for a quote inside a quote.
Reference
Attributes
Element-specific attributes on <q> (plus global attributes):
Albert Einstein once said, Imagination is more important than knowledge.
How It Works
Write the sentence that introduces the quote.
Wrap only the quoted words in <q>.
Do not type " inside the element.
The browser adds opening and closing quotation marks.
Example 2 — cite Attribute
Point to a source URL for tools and metadata (not shown as a link by default).
HTML
<p>
According to Mozilla’s website,
<q cite="https://www.mozilla.org/en-US/about/history/details/">
Firefox 1.0 was released in 2004 and became a big success.
</q>
</p>
She wrote, He told me Meet me at noon and then left.
How It Works
Outer <q> is the main quotation.
Inner <q> is the quote spoken inside it.
Browsers pick quote styles by nesting level (often double then single).
Control the characters with CSS quotes and document lang when needed.
Example 4 — q vs blockquote
Use q inline; use blockquote for a longer, stand-alone passage.
HTML
<p>
Short: <q>Stay hungry. Stay foolish.</q>
</p>
<blockquote>
<p>Your time is limited, so don’t waste it living someone else’s life.</p>
</blockquote>
Your time is limited, so don’t waste it living someone else’s life.
How It Works
<q> stays in the sentence as phrasing content.
<blockquote> is a block that can hold paragraphs.
Both may use the cite attribute for a source URL.
Pick by length and layout, not by which looks fancier.
Edge Cases & Pitfalls
Most q mistakes are double quote marks, wrong companions, or treating cite as a visible link.
marks
Avoid manual quotation characters
Typing "…" inside <q> usually shows four marks. Let the UA insert quotes via ::before / ::after.
length
Long passages belong in blockquote
<q> is for short inline phrases. Multi-paragraph excerpts → <blockquote>.
cite
cite attribute vs <cite> element
Attribute = source URL. Element = title of a work. Do not mix them up when writing credits.
lang
Quote glyphs follow language
Set lang correctly; customize with CSS quotes for French guillemets, German low-high marks, and similar.
Compatibility
Browser Support
The <q> element is core HTML phrasing content in every browser. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
<q>
Widely available since about July 2015 (and long before). Browsers insert quotation marks around the element; exact glyphs can vary by language and stylesheet.
98%Global support (approx.)
Google ChromeAll
Full support
Mozilla FirefoxAll
Full support
Apple SafariAll
Full support
Microsoft EdgeAll
Full support
OperaAll
Full support
Samsung InternetAll
Full support
Internet ExplorerAll
Supported
<q>Widely supported
Bottom line: Safe to use for inline quotes. Skip manual quote characters, use blockquote for long excerpts, and keep visible credits in the surrounding text.
Remember
Key Takeaways
Role:<q> marks a short inline quotation; browsers add the marks.
cite: optional source URL — not a visible link by default.
Nesting: wrap quotes in quotes with nested <q> elements.
Siblings: long text → blockquote; work titles → <cite>.
One line: wrap the short quote in <q> without typing marks; use blockquote when it needs its own block.
UA style
Default CSS Settings
Typical user-agent styling for q (quote glyphs can vary by language):