HTML - <blockquote> Tag



The HTML <blockquote> tag indicates that the enclosed text is a long quotation. Usually, this is quoted from another source. It changes the alignment to make it unique among others. It contains both opening and closing tags.

The <blockquote> tags, included heading, lists, paragraphs, etc. It has just one attribute called "cite" that is used to identify the quotation's source.

The< blockquote> tag in HTML5 specifies the section that is quoted from other sources. But HTML 4.1 defines "long quotations," i.e., quotations that span multiple lines.

Syntax

Following is the syntax for HTML <blockquote> tag −

<blockquote>...</blockquote>

Example

In the following example, let’s see the usage of <blockquote> tag in the HTML documents, as follows −

<!DOCTYPE html>
<html>
<body>
   <h2>Blockquote example</h2>
   <blockquote> Lorem ipsum, or lipsum as it is sometimes known, is dummy text used in laying out print, graphic or web designs. The passage is attributed to an unknown typesetter in the 15th century who is thought to have scrambled parts of Cicero's De Finibus Bonorum et Malorum for use in a type specimen book. </blockquote>
 </body>
</html>

When we run the above code, it will generate an output consisting of the text that is used with blockquote displayed on the webpage.

Example

Considering the following example, we are creating an HTML document and using the <blockquote> tag and its attribute "cite" to identify the quotation's source –

<!DOCTYPE html>
<html>
<body>
   <h2>Blockquote example</h2>
   <blockquote cite="https://www.tutorialspoint.com">Lorem ipsum, or lipsum as it is sometimes known, is dummy text used in laying out print, graphic or web designs. The passage is attributed to an unknown typesetter in the 15th century who is thought to have scrambled parts of Cicero's De Finibus Bonorum et Malorum for use in a type specimen book. </blockquote>
 </body>
</html>

On running the above code, the output window will pop up displaying the text that is used with blockquote on the webpage.

Example

Let's look into the following example, we are Creating an HTML document and styling properties for style the blockquote element, as follows −

<!DOCTYPE html>
<html>
<head>
   <style>
      blockquote {
      color: green;
      font-style: italic;
      }
   </style>
</head>
<body>
   <h2>Blockquote example</h2>
   <blockquote cite="https://www.tutorialspoint.com">TutorialsPoint Easy to Learn!</blockquote>
 </body>
</html>

When we run the above code, it will generate an output consisting of the blockquote text along with a CSS applied to it displayed on the webpage.

html_tags_reference.htm
Advertisements