blockquote Tag in HTML
The <blockquote> tag is an HTML element that is used to indicate a block of quoted text. It is typically used to display a long quote or a block of text that is taken from another source.
Syntax:
The basic syntax for the <blockquote> tag is as follows:
<blockquote>
<!– Quoted text goes here –>
</blockquote>
The text that you want to quote should be placed between the opening and closing <blockquote> tags.
Attributes:
The <blockquote> tag supports a few attributes that can be used to provide additional information about the quoted text. Here are some of the most commonly used attributes:
cite
: This attribute is used to provide a link to the source of the quoted text. It should contain the URL of the source.class
: This attribute is used to specify one or more CSS classes to be applied to the <blockquote> element.
Example:
Here’s an example of how the <blockquote> tag can be used in HTML:
<blockquote>
“The greatest glory in living lies not in never falling, but in rising every time we fall.” – Nelson Mandela
</blockquote>
This will display the quoted text in a blockquote element, with quotation marks and an attribution.
Styling:
The appearance of the <blockquote> tag can be customized using CSS. You can use CSS to change the font, color, background, and other properties of the blockquote element.
Conclusion:
The <blockquote> tag is a useful HTML element that is used to indicate a block of quoted text. It can be used to display a long quote or a block of text that is taken from another source. By using CSS, you can customize the appearance of the blockquote element to match the style of your website.