Definition
The <blockquote>
HTML element is used to indicate a block of quoted content, typically attributed to another source. It is commonly used to display a longer quote or excerpt within an HTML document.
Here’s an example of how the <blockquote>
element can be used:
<blockquote>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin sagittis
ullamcorper dapibus.
</p>
<footer>
<cite>John Doe</cite>
</footer>
</blockquote>
In this example, the <blockquote>
element contains a paragraph (<p>
) with the quoted text. The <footer>
element is used to provide attribution to the source of the quote, and the <cite>
element is used to specify the author or the source of the quote.
The <blockquote>
element is a semantic element that conveys the meaning of a quoted block of content to both users and search engines. It helps differentiate quoted content from the rest of the document and allows for consistent styling or formatting of the quoted text.
You can style the <blockquote>
element using CSS to change its appearance, such as adding indentation, borders, or background colors. Additionally, you can apply styles to the nested elements within the <blockquote>
, like the <p>
, <footer>
, and <cite>
elements, to further customize the presentation.
When using the <blockquote>
element, it’s important to ensure that the quoted content is properly attributed and that you have the necessary rights or permissions to quote the source. Proper citation and attribution are crucial for maintaining ethical and legal standards when using quoted content.