<blockquote> Tag in HTML
The <blockquote> tag is used to define a block of text that is a quotation from another source. It is typically used to display large quotes or excerpts from an external source in a visually distinct block, with an indentation on both sides.
Key Points on <blockquote> Tag:
- The
<blockquote>
tag is used to represent a block of quoted text, usually from an external source. - By default, the content inside a
<blockquote>
tag is indented to indicate that it is a quotation. - It is generally accompanied by the
cite
attribute, which provides a reference to the source of the quotation. - It is important to use
<blockquote>
for long quotes, while for shorter quotes,<q>
can be used.
Syntax of <blockquote> Tag:
Syntax Example
<blockquote cite="source_url">
Quoted text goes here.
</blockquote>
Example of <blockquote> Tag in HTML:
This example demonstrates how the <blockquote>
tag is used to display a quoted text from an external source.
Code Example
<html>
<head></head>
<body>
<blockquote cite="https://www.example.com">
"The journey of a thousand miles begins with one step."
<footer>— Lao Tzu</footer>
</blockquote>
</body>
</html>
Output
"The journey of a thousand miles begins with one step."
The <blockquote>
tag is generally used for longer quotations. You can also include a cite
attribute to reference the source of the quotation, and a <footer>
tag can be used to include the author's name or additional information.