How to use blockquote in HTML?


The <blockquote> tag is to indicate long quotations. It should contain only block-level elements within it and not just plain text. It specifies a section quoted from another source and contains only block-level elements.

We can also use the cite attribute inside the <blockquote> tag to indicate the source of the quotation in URL form.

Syntax

Following is the syntax for the <blockquote> tag.

<blockquote>The multiple line content to be quoted </blockquote>

Example

Following is the example program for the <blockquote> tag.

<!DOCTYPE html> <html> <head> </head> <body> <p>DLF stands for Delhi Land and Finance</p> <blockquote>Delhi Land and Finance is one of the largest commercial real estate developer in India.It is also engaged in the business of generation of power provision of maintenance services hospitality and recreational activities life insurance and retail chain outlets. Its internalbusiness includes development business and rental business. The development business of the Company is involved in the sale of residential spaces select commercial offices and commercial complexes. The company has a unique business model with earnings arising from development and rentals.</blockquote> </body> </html>

Example

Following is the example program when we use cite attribute inside the <blockquote> tag.

<!DOCTYPE html> <html> <head> <title>HTML blockquote tag</title> </head> <body> <h1>Drupal</h1> <p>Here is a quotation from Drupal’s official website</p> <blockquote cite="http://drupal.org">The Drupal project is open source software. Anyone can download, use, work on, and share it with others. It's built on principles like collaboration, globalism, and innovation.</blockquote> </body> </html>

Example

Following is the example program when we changed the style of <blockquote> tag by using CSS.

<!DOCTYPE html> <html> <head> <title>HTML blockquote tag</title> <style> blockquote { margin-left: 0; } </style> </head> <body> <h1>Drupal</h1> <p>Here is a quotation from Drupal’s official website</p> <blockquote cite="http://drupal.org">The Drupal project is open source software. Anyone can download, use, work on, and share it with others. It's built on principles like collaboration, globalism, and innovation.</blockquote> </body> </html>

Updated on: 11-Nov-2022

423 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements