HTML <blockquote> Tag

This post focuses on the HTML tag blockquote. With the optimism that it would help us all learn.

A blockquote, a section that is quoted from a different source, can be identified using the HTML tag blockquote:

The given example shows the working of <blockquote> tag:

Example: 

<!DOCTYPE html> <html> <body> <blockquote cite="https://www.wfp.org/"> The World Food Programme is the world's largest humanitarian organization saving lives in emergencies and using food assistance to build a pathway to peace, stability and prosperity for people recovering from conflict, disasters and the impact of climate change. </blockquote> </body> </html>

Indentation can be discarded from blockquotes by modifying CSS:

Example: 

<!DOCTYPE html> <html> <head> <style> blockquote { margin-left: 0; } </style> </head> <body> <p>Here is a quote from the WFP website:</p> <blockquote cite="https://www.wfp.org/"> The World Food Programme is the world's largest humanitarian organization saving lives in emergencies and using food assistance to build a pathway to peace, stability and prosperity for people recovering from conflict, disasters and the impact of climate change. </blockquote> </body> </html>

Here is another example of the <blockquote> tag with the <cite> tag:

Example: 

<!DOCTYPE html> <html> <head> <style> blockquote { margin-left: 0; } </style> </head> <body> <blockquote cite="https://www.brainyquote.com/quotes/helen_keller/103068"> <p>"The best and most beautiful things in the world cannot be seen or even touched they must be felt with the heart."</p> <footer>Helen Keller</footer> </blockquote> </body> </html>


CSS Default Settings

Often browsers will show the following defaults values for the <blockquote> element:

blockquote {
display: block;
margin-top: 1.2em;
margin-bottom: 1.2em;
margin-left: 44px;
margin-right: 44px;
}

Uses and Definition

Using the HTML tag blockquote, you are describing a text section quoted from another source.

Browsers often indent blockquote elements (see the following example for information on removing the indentation).

Advice: When quoting inline, use <q> .

Browser Compatibility

Element
<blockquote>YesYesYesYesYes

Attributes

AttributeValueOverview
citeURLProvides the quotation’s source.

Global Attributes

Additionally, the <blockquote> tag is compatible with HTML Global Attributes.


Event Attributes

In HTML, Event Attributes are also accepted by the HTML tag blockquote <blockquote>.


Advantages of Using <blockquote> Tag

Here are some advantages of using this tag:

  • The <blockquote> tag provides a visual cue to the reader that a section of text is quoted. This makes it easier for readers to distinguish between quoted text and regular text, improving the overall readability of the document.
  • By using the <blockquote> tag, web developers can provide semantic meaning to the quoted text, indicating that it is a direct quotation from another source. This can help search engines and other web crawlers understand the structure and content of the document, which can improve the search engine optimization (SEO) of the page.
  • The <blockquote> tag can improve the accessibility of the document by providing additional context to screen readers and other assistive technologies. By indicating that a section of text is a quote, screen readers can read the text with appropriate pauses and intonations, making it easier for users with visual impairments to understand the structure and meaning of the text.
  • The <blockquote> tag can be styled with CSS to provide a distinct visual appearance for quoted text. This can help to make the text stand out and draw attention to important information, such as a key quote from an article or a testimonial from a customer.
If you found this article informative, then do share it with you friends as well by clicking on the links below.
We value your feedback.
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0
+1
0

Subscribe To Our Newsletter
Enter your email to receive a weekly round-up of our best posts. Learn more!
icon

Leave a Reply

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