HTML: <blockquote> tag
This HTML tutorial explains how to use the HTML element called the <blockquote> tag with syntax and examples.
Description
The HTML <blockquote> tag defines a long block quotation in the HTML document from another source. Browsers traditionally render the text found within the <blockquote> tag as indented text. This tag is also commonly referred to as the <blockquote> element.
Syntax
In HTML, the syntax for the <blockquote> tag is:
<body>
<blockquote>Your trusted resource for learning new technologies. We've been providing tutorials, references, and step-by-step instructions since 2003. TechOnTheNet.com is a great place to learn a new technology, or find a quick reference. It has never been easier to learn Database technologies, Microsoft Office products, and more!!</blockquote>
</body>
Sample Output
Attributes
In addition to the Global Attributes, the following is a list of attributes that are specific to the <blockquote> tag:
Attribute |
Description |
HTML Compatibility |
cite |
URL for the source document or a message for the quotation explaining the reference for the quote. |
HTML 4.01, HTML5 |
Note
- The HTML <blockquote> element is found within the <body> tag.
- For a short inline quotation, use the <q> tag.
- Most browsers will render the text within the <blockquote> tag as indented text but you can change this behavior with CSS.
Browser Compatibility
The <blockquote> tag has basic support with the following browsers:
- Chrome
- Android
- Firefox (Gecko)
- Firefox Mobile (Gecko)
- Internet Explorer (IE)
- Edge Mobile
- Opera
- Opera Mobile
- Safari (WebKit)
- Safari Mobile
Example
We will discuss the <blockquote> tag below, exploring examples of how to use the <blockquote> tag in HTML5, HTML 4.01 Transitional, XHTML 1.0 Transitional, XHTML 1.0 Strict, and XHTML 1.1.
HTML5 Document
If you created a new web page in HTML5, your <blockquote> tag might look like this:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML5 Example by www.techonthenet.com</title>
</head>
<body>
<h1>Heading 1</h1>
<p>This is the content that would appear under Heading 1.</p>
<blockquote>This is a quote</blockquote>
<blockquote cite="https://www.techonthenet.com">This is a quote that uses the cite attribute</blockquote>
</body>
</html>
In this HTML5 Document example, we have created two <blockquote> tags. The first <blockquote> tag contains the text "This is a quote". The second <blockquote> tag contains text and uses the cite attribute.
HTML 4.01 Transitional Document
If you created a new web page in HTML 4.01 Transitional, your <blockquote> tag might look like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>HTML 4.01 Transitional Example by www.techonthenet.com</title>
</head>
<body>
<h1>Heading 1</h1>
<p>This is the content that would appear under Heading 1.</p>
<blockquote>This is a quote</blockquote>
<blockquote cite="https://www.techonthenet.com">This is a quote that uses the cite attribute</blockquote>
</body>
</html>
In this HTML 4.01 Transitional Document example, we have created two <blockquote> tags. The first <blockquote> tag contains the text "This is a quote". The second <blockquote> tag contains text and uses the cite attribute.
XHTML 1.0 Transitional Document
If you created a new web page in XHTML 1.0 Transitional, your <blockquote> tag might look like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>XHMTL 1.0 Transitional Example by www.techonthenet.com</title>
</head>
<body>
<h1>Heading 1</h1>
<p>This is the content that would appear under Heading 1.</p>
<blockquote>This is a quote</blockquote>
<blockquote cite="https://www.techonthenet.com">This is a quote that uses the cite attribute</blockquote>
</body>
</html>
In this XHTML 1.0 Transitional Document example, we have created two <blockquote> tags. The first <blockquote> tag contains the text "This is a quote". The second <blockquote> tag contains text and uses the cite attribute.
XHTML 1.0 Strict Document
If you created a new web page in XHTML 1.0 Strict, your <blockquote> tag might look like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>XHTML 1.0 Strict Example by www.techonthenet.com</title>
</head>
<body>
<h1>Heading 1</h1>
<p>This is the content that would appear under Heading 1.</p>
<blockquote>This is a quote</blockquote>
<blockquote cite="https://www.techonthenet.com">This is a quote that uses the cite attribute</blockquote>
</body>
</html>
In this XHTML 1.0 Strict Document example, we have created two <blockquote> tags. The first <blockquote> tag contains the text "This is a quote". The second <blockquote> tag contains text and uses the cite attribute.
XHTML 1.1 Document
If you created a new web page in XHTML 1.1, your <blockquote> tag might look like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>XHTML 1.1 Example by www.techonthenet.com</title>
</head>
<body>
<h1>Heading 1</h1>
<p>This is the content that would appear under Heading 1.</p>
<blockquote>This is a quote</blockquote>
<blockquote cite="https://www.techonthenet.com">This is a quote that uses the cite attribute</blockquote>
</body>
</html>
In this XHTML 1.1 Document example, we have created two <blockquote> tags. The first <blockquote> tag contains the text "This is a quote". The second <blockquote> tag contains text and uses the cite attribute.