
Use of blockquote in HTML
Use the HTML < blockquote > tag to indicate long quotations (i.e. quotations spanning multiple lines). It should only contain elements at the block level and not just plain text.
How to Use Blockquote on Your Webpages:
You sometimes want to call out a block of text as a quotation when you write text on a web page and create the layout of that page. This could be a quote from somewhere else, like a testimonial to a client that accompanies a case study or success story of a project.
This may also be a treatment of design that repeats some significant text from the article or content itself. So let’s look at how to use the blockquote tag to describe lengthy quotations.
Example of Using the Blockquote Tag:
The blockquote tag is a semantic tag that tells a long quotation to the browser or user agent. You should not include text inside the blockquote tag that is not a quotation.
Just surround the text that is a quotation with the following tag pair to add the blockquote tag to your text.
Opening: <blockquote> Closing: </blockquote>
Example:
<!DOCTYPE html> <html> <head> <title>HTML blockquote Tag <body> <blockquote cite="http://www.worldwildlife.org/who/index.html"> For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally. </blockquote> </body>
Do Not Use Blockquote to Indent Text:
People used the blockquote tag for many years if they wanted to indent text on their website, even if it wasn’t a pull quote. That’s the wrong practice! For visual reasons alone, you don’t want to use blockquote semantics.