HTML Quotation & Citation Tags
Master the art of properly citing sources and adding quotations to your web content. Learn semantic HTML elements for academic and professional content.
How do you add quotes and citations in HTML?
Use <blockquote> for long quotations set off as their own block, <q> for short inline quotes (the browser adds quotation marks), and <cite> for the title of a cited work. <abbr title="…"> explains abbreviations, and <address> holds contact information.
<blockquote cite="https://example.com/source">
<p>Simplicity is prerequisite for reliability.</p>
<footer>— Edsger Dijkstra, <cite>How do we tell truths that might hurt?</cite></footer>
</blockquote>
<p>She said <q>ship it</q> and left.</p>
<p><abbr title="HyperText Markup Language">HTML</abbr> is fun.</p>Understanding Quotations in HTML
HTML provides specific elements for marking up quotations and citations, helping search engines and screen readers understand the semantic meaning of your content. These elements also provide styling hooks for CSS.
Key Quotation Elements:
<q>- Inline quotations<blockquote>- Block quotations<cite>- Citations and references<abbr>- Abbreviations
Why Use Semantic Elements?
- • Better accessibility for screen readers
- • Improved SEO and search engine understanding
- • Consistent styling opportunities
- • Academic and professional credibility
Basic Quotation Examples
Try these examples to see how different quotation elements work. Notice how browsers automatically add quotation marks to the <q> element.
Code Editor
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML Quotation and Citation Examples</title>
<style>
body { font-family: Arial, sans-serif; line-height: 1.6; padding: 20px; }
blockquote {
background: #f9f9f9;
border-left: 4px solid #ccc;
padding: 15px;
margin: 20px 0;
font-style: italic;
}
q { color: #666; }
cite { font-style: italic; color: #888; }
abbr { text-decoration: underline dotted; }
</style>
</head>
<body>
<h1>Quotations and Citations in HTML</h1>
<!-- Short inline quotations -->
<p>According to Albert Einstein: <q>Imagination is more important than knowledge.</q></p>
<!-- Block quotations -->
<blockquote cite="https://example.com/source">
<p>The best time to plant a tree was 20 years ago. The second best time is now.</p>
<footer>— <cite>Chinese Proverb</cite></footer>
</blockquote>
<!-- Citations and references -->
<p>The concept is explained in detail in <cite>HTML: The Complete Reference</cite> by Thomas Powell.</p>
<p>For more information, see the <cite><a href="https://www.w3.org/TR/html/">HTML Living Standard</a></cite>.</p>
<!-- Abbreviations -->
<p>The <abbr title="World Wide Web Consortium">W3C</abbr> maintains web standards.</p>
<p>This document uses <abbr title="HyperText Markup Language">HTML</abbr> and <abbr title="Cascading Style Sheets">CSS</abbr>.</p>
<!-- Definitions -->
<p><dfn>HTML</dfn> is the standard markup language for creating web pages.</p>
<p>A <dfn title="Uniform Resource Locator">URL</dfn> specifies the location of a resource on the internet.</p>
<!-- Work titles -->
<p>I recently read <cite>The Great Gatsby</cite> by F. Scott Fitzgerald.</p>
<p>The movie <cite>Inception</cite> was directed by Christopher Nolan.</p>
</body>
</html>Preview
The <q> Element - Inline Quotations
The <q> element is used for short, inline quotations. Browsers automatically add quotation marks around the content.
Usage Guidelines:
- ✓ Use for: Short quotes within paragraphs or sentences
- ✓ Use for: Direct speech or dialogue
- ✗ Don't use for: Long quotations (use blockquote instead)
- ✗ Don't add: Manual quotation marks (browsers add them)
Example:
<p>As Shakespeare wrote: <q>To be or not to be, that is the question.</q></p>The <blockquote> Element - Block Quotations
The <blockquote> element is used for longer quotations that are displayed as a separate block of text, typically indented from the main content.
Key Features:
- • Automatically styled as a block element
- • Usually indented by browsers
- • Can include the
citeattribute - • Perfect for lengthy quotations
Common Styling:
- • Italic text styling
- • Left border or background
- • Increased margins and padding
- • Different font or size
Example with citation:
<blockquote cite="https://example.com/source">
<p>Innovation distinguishes between a leader and a follower.</p>
<footer>— <cite>Steve Jobs</cite></footer>
</blockquote>The <cite> Element - Citations and References
The <cite> element represents the title of a work, such as a book, paper, essay, poem, score, song, script, film, TV show, game, sculpture, painting, etc.
What to Cite:
- • Book titles
- • Movie titles
- • Research papers
- • Websites
- • Software applications
- • Songs and albums
- • Artworks
- • Legal documents
⚠️ Important Note:
The <cite> element should contain the title of a work, not the name of a person. For person names, use regular text or other semantic elements.
Abbreviations and Definitions
The <abbr> Element
Used to mark up abbreviations and acronyms. The title attribute provides the full expansion.
<abbr title="World Wide Web">WWW</abbr>The <dfn> Element
Used to mark up the first occurrence of a term being defined in the document.
<dfn>HTML</dfn> is a markup language.Accessibility Benefits:
- • Screen readers can announce abbreviations properly
- • Tooltips show full expansions on hover
- • Helps users understand technical terms
- • Improves overall content accessibility
Advanced Quotation Techniques
This advanced example shows how to create professional-looking quotations with proper styling and semantic markup for academic or professional content.
Code Editor
<blockquote cite="https://en.wikipedia.org/wiki/Edsger_W._Dijkstra">
<p>Simplicity is prerequisite for reliability.</p>
<footer>— Edsger W. Dijkstra</footer>
</blockquote>
<p>As the docs say, <q>HTML is the structure of the web</q>.</p>
<p>My favourite book is <cite>Eloquent JavaScript</cite>.</p>
<p><abbr title="Cascading Style Sheets">CSS</abbr> styles the page.</p>
<address>Compileum · <a href="mailto:hello@example.com">hello@example.com</a></address>
<style>
blockquote { border-left: 4px solid #2563eb; margin: 0; padding: 4px 12px; background: #f8fafc; }
abbr { text-decoration: underline dotted; cursor: help; }
</style>Preview
Best Practices for Quotations and Citations
✓ Do This
- Use
<q>for short inline quotations - Use
<blockquote>for longer block quotations - Include the
citeattribute with source URLs - Use
<cite>for work titles, not author names - Provide
titleattributes for abbreviations
✗ Avoid This
- ✗Adding manual quotation marks to
<q>elements - ✗Using
<cite>for author names - ✗Using
<blockquote>just for indentation - ✗Forgetting to cite sources in academic content
- ✗Using abbreviations without explanations
Quotations and Citations — step by step
Use blockquote for long quotations
The blockquote element represents a section quoted from another source. Use the cite attribute to provide the URL of the original source. Style it with CSS for visual indentation.
🎯 Quick Check
Which HTML element should you use for a short inline quotation within a paragraph?
HTML Quotations and Citations: summary
Key points
- The
citeattribute holds a source URL but isn't shown. Display the source in visible text too. <cite>is for the title of a work, not the person's name.- Don't use
<blockquote>just to indent text; use CSS for that.
Frequently asked questions
›What is the difference between <q> and <blockquote>?
<q> is an inline short quote inside a sentence, with quotation marks added automatically. <blockquote> is a block-level extended quotation.