👀 Live Preview
Einstein quote inline in a paragraph:
Albert Einstein once said, Imagination is more important than knowledge.

The <q> tag marks short inline quotations in running text. This guide covers syntax, the cite attribute, comparisons with blockquote, and best practices for beginners.
Short phrases in text.
Link to source.
Inline vs block.
Browser styling.
Meaningful markup.
Clear quotations.
<q> Tag?The <q> tag is an HTML element specifically designed to encapsulate short inline quotations. It is meant to be used within paragraphs or text-based content to distinguish quoted material from the surrounding text.
Browsers add quotation marks around <q> content. Use it for brief quotes inside sentences, not for long block-level passages.
For longer quotations that stand on their own, use <blockquote> instead.
Surround quoted text with opening <q> and closing </q> tags:
<p>In Shakespeare's famous play, Juliet implores Romeo to "<q>deny thy father and refuse thy name</q>."</p>q inside block text such as p, not as a standalone page section.q — browsers add them automatically.cite for the source URL when you have one.blockquote for multi-sentence or block-level quotes.| Topic | Code Snippet | Notes |
|---|---|---|
| Basic inline quote | <q>text</q> | Inside a sentence |
| With source URL | cite="https://..." | Not visible |
| Display | Inline | Flows with text |
| Long quotes | Use blockquote | Block-level |
| Work titles | Use cite element | Not for quote text |
| Browser support | Universal | All browsers |
<q> vs <blockquote>| Feature | <q> | <blockquote> |
|---|---|---|
| Display | Inline | Block-level |
| Best for | Short phrases | Longer passages |
| Default style | Quotation marks | Indented block |
| cite attribute | Yes | Yes |
The <q> tag supports the cite attribute to reference the quotation source:
<q cite="https://example.com/quotations">Your quoted text here</q>cite SourceURL pointing to the document where the quotation comes from.
cite="https://..."class CSSGlobal attribute for custom quote styling.
class="pull-quote"lang LanguageSets quote language for correct quotation mark glyphs.
lang="fr"Embed short quotations inline and attribute them to sources with cite.
Einstein quote inline in a paragraph:
Albert Einstein once said, Imagination is more important than knowledge.
The <q> tag embeds short inline quotations seamlessly within paragraphs and links them to sources when needed.
The primary use of q is for embedding short, inline quotations seamlessly within a paragraph.
<p>Albert Einstein once said, "<q>Imagination is more important than knowledge.</q>"</p>Include the cite attribute to attribute the quotation to its source.
<q cite="https://www.brainyquote.com/quotes/albert-einstein-131205">
Imagination is more important than knowledge.
</q>cite element marks work titles; q holds the quoted words.Place the quoted phrase inside q within a sentence.
Default styles insert language-appropriate quotation glyphs.
The cite attribute links to the original document.
Readers see quoted material distinguished from your own prose.
The <q> tag is supported in all major browsers, including Internet Explorer.
All browsers render <q> with quotation marks and support the cite attribute.
Bottom line: Use <q> confidently for inline quotations in any browser.
Mastering the <q> tag empowers web developers to seamlessly integrate inline quotations into their content. By following best practices and understanding browser support, you can ensure a consistent and engaging user experience for your audience.
q for short inline quotationscite when you have a source URLblockquote for longer passagesqqcite attribute with cite elementq for block-level long quotes<q>Bookmark these before you cite sources inline.
Short phrases in text.
BehaviorSource reference.
AttributesInline vs block.
SemanticsBrowser default.
StyleQuote vs title.
DistinctionAll browsers.
Compatibilityblockquote for longer, block-level quotations that stand apart from the paragraph.q content.Practice <q> with cite and inline examples in the Try It editor.
6 people found this page helpful