How to display long quotations in HTML ?
In this article, we will discuss the tag that will display long quotations.
The <blockquote> tag in HTML is used to display the long quotations (a section that is quoted from another source). It changes the alignment to make it unique from others. It contains both opening and closing tags. In the blockquote tag, we can use elements like heading, list, paragraph, etc.
Note: The <blockquote> tag in HTML4.1 defines the long quotation i.e. quotations that span multiple lines. But in HTML5, the <blockquote> tag specify the section that is quoted from other source.
Syntax:
<blockquote> Contents... </blockquote>
Attribute: It contains a single attribute cite which is used to specify the source of the quotation.
The below examples illustrate the blockquote tag:
Example 1:
HTML
<!DOCTYPE html> < html > < body > < h1 >GeeksforGeeks</ h1 > < h2 > < blockquote > Tag </ h2 > <!--blockquote Tag starts here --> < blockquote cite = HTML stands for HyperText Markup Language. It is used to design web pages using a markup language. HTML is the combination of Hypertext and Markup language. Hypertext defines the link between the web pages. A markup language is used to define the text document within tag which defines the structure of web pages. </ blockquote > <!--blockquote Tag ends here --> </ body > </ html > |
Output:
Example 2:
HTML
<!DOCTYPE html> < html > < body > < h1 >GeeksforGeeks</ h1 > < h2 >< blockquote > Tag</ h2 > < p >This is blockquote Tag text with attribute cite</ p > <!--blockquote Tag starts here --> < blockquote cite = "www.geeksforgeeks.org" > GeeksforGeeks:A computer science portal for geeks </ blockquote > <!--blockquote Tag ends here --> </ body > </ html > |
Output:
Please Login to comment...