HTML Blockquote Tag: How to Create Quotes

html blockquote tag

The HTML blockquote tag defines a long quote from another source. It sets the quoted text apart from other content. Browsers usually indent blockquote content.

It adds semantic meaning to quoted sections.

How to Use the HTML Blockquote Tag

The <blockquote> tag is used in HTML to show a long quote from another source.

Here is the syntax:

<blockquote cite="source-url">
  Quoted content here
</blockquote>

The cite attribute is optional. Use it to include a source reference:

  • To show a full sentence or paragraph someone else said
  • To separate quoted content from your own writing
  • To make your HTML more semantic (meaningful for screen readers and search engines)

You can wrap quoted text inside <blockquote> and </blockquote>. Also, you can nest tags like <p>, <cite>, and <footer> inside the blockquote. The cite attribute is an optional to point to the source URL.

You can place multiple paragraphs or inline elements inside the tag. No attribute is required. But valid nested helps browsers display content better.

Here is a quick example:

<blockquote cite="https://example.com/source">
  <p>This is a quoted paragraph.</p>
</blockquote>

Don’t use it for:

  • Short quotes (use <q> for that)
  • Style only (use CSS instead)

So, when to use the HTML Blockquote tag?

  • Use it to quote long text from outside sources.
  • This fits well in interviews, articles, and reviews.
  • The tag makes the quote clear to readers. It helps them track the source.
  • Do not use it for design purposes. Use it only for real quotes.
  • Correct use helps SEO and aids assistive tools.

Styles the HTML Blockquote Tag

If you don’t style the <blockquote> tag, The browser apply these default styles:

  • Indented from the left (margin-left)
  • Displayed as a block-level element
  • No quotation marks by default
  • Extra top and bottom spaces

Here is a simple example of how to style it:

blockquote {
  border-left: 4px solid #ccc;
  margin: 1em 0;
  padding-left: 1em;
  color: #666;
  font-style: italic;
}

This CSS code adds a left border and improves the visual cue for quoted content.

Here is another example to custom quotation marks with CSS:

blockquote::before {
  content: "“";
  font-size: 2em;
  color: #999;
  vertical-align: top;
}

blockquote::after {
  content: "”";
  font-size: 2em;
  color: #999;
  vertical-align: bottom;
}

What this does:

  • It adds a large opening quote before the block
  • It adds a closing quote after it
  • You control size, color, and position

The Difference Between HTML <blockquote> Tag and <q> Tag

Both <blockquote> and <q> are used to show quotes in HTML, but they work differently and have different use cases.

Here is a table that shows you key differences:

TagUsed For
<blockquote>Quoting a long section of text, usually from another source
<q>Quoting a short phrase or sentence inline inside a paragraph

The q tag adds quote marks by default while Blockquote does not. The blockquote used for standalone quotes. But, the q used when you quote a phrase.

Examples of Blockquote Element

Here is an extended use case:

<blockquote cite="https://example.com/article">
  <p>This is the first paragraph of the quote.</p>
  <p>Here is a second paragraph to extend the quotation.</p>
  <footer>
    — Author Name, <cite>Source Title</cite>
  </footer>
</blockquote>

This adds citation inside the blockquote and gives both structure and meaning.

You can embed blockquotes in blog sections, and you can load quotes with JavaScript. Also, you can pair with semantic tags like <figure>.

Wrapping Up

In this article you learned what the HTML blockquote tag does and how to use it in real code.

Here is a quick recap:

  • Use <blockquote> to mark long quotes from other sources.
  • Wrap quotes with semantic tags like <p>, <footer>, or <cite>.
  • Add the cite attribute to link to the source.
  • Style with CSS to match your design.
  • Use blockquote only for real quotations, not visual design.

What does the HTML blockquote tag do?

The tag shows a long quotation from another source. Browsers usually indent this text. It helps readers see quoted content clearly.

How do you use the blockquote tag in HTML?

You wrap the quoted text inside the tag. Here is an example:

  This is a quoted paragraph from another website.

What is the difference between blockquote and q in HTML?

The tag is for longer quotes and creates a separate block. The tag is for short quotes inside a sentence. adds indentation. adds quotation marks.

Can you style the blockquote tag with CSS?

Yes. You can style it to match your design. Here is an example:
blockquote {
  border-left: 4px solid #ccc;
  padding-left: 10px;
  color: #555;
}

Is it necessary to add cite attribute to blockquote?

No, it is not required. But adding the cite attribute shows where the quote came from. It helps with clarity and SEO.

Similar Reads

HTML Compatibility: Old vs New Browsers

HTML code does not always show the same result on every browser. Old browsers follow outdated rules while modern browsers…

HTML details Tag: How to Toggle Hidden Content

The <details> tag hides content and shows it when needed. It helps organize long pages. The tag shows extra info…

HTML b Tag: How to Bold Text

Use the HTML b tag to make text bold without giving it extra meaning. It adds visual weight only. Understand…

HTML meta http-equiv Attribute for Web SEO with Examples

This guide explains how to use the HTML meta http-equiv attribute, why it matters for SEO, and how browsers treat…

Component-driven HTML Guide with Examples

This guide shows how to build HTML with separate parts as components and how each part helps in reuse and…

How to Use sub Tag for Subscript Text in HTML

The sub tag in HTML shows text in subscript form. It places the text slightly below the normal baseline of…

HTML style Tag: Inline CSS

The style tag in HTML defines CSS inside a web page. Click to see how it works with syntax and…

HTML dialog Tag: How to Create Dialog Boxes

The <dialog> tag is used to build modal popups in HTML. It shows alerts and messages without third-party scripts. Understand…

HTML samp Tag: How to Show Sample Program Output

The HTML samp tag shows the result of a computer program or command. It helps readers know which text came…

HTML Global Attributes Overview

HTML global attributes work on most elements. They do not depend on the tag name. You can use them with…

Previous Article

HTML Small Tag: How to Make Text Small

Next Article

HTML Table Tag: How to Build Tables with Its Elements

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *


Subscribe to Get Updates

Get the latest updates on Coding, Database, and Algorithms straight to your inbox.
No spam. Unsubscribe anytime.