CodesJava

Easy learning with example program codes

Blockquote HTML

HTML <blockquote> Tag

To specify a block of text that is quoted from another source, the HTML <blockquote> tag is used. On the browser, it displays the content as indented text. For short or inline quote, the HTML <q> tag can be used instead of the HTML <blockquote> tag.

Syntax:

<blockquote>content</blockquote>

Example:

<!DOCTYPE html>
<html>
<body>
<h1>Motivational Quotes</h1>
<blockquote 
cite="https://www.inc.com/jeff-haden/75-inspiring-motivational-quotes-for-being-happier.html">
If you look to others for fulfillment, you will never be fulfilled. 
If your happiness depends on money, you will never be happy with yourself. 
Be content with what you have; rejoice in the way things are. When you realize there is nothing lacking, 
the world belongs to you.
</blockquote>
<cite>-Lao Tzu</cite>  
</body>
</html>

Output:

Explanation:

In the above example, we have used the HTML <blockquote> tag to specify that the content is quoted from another source.

 

Example 2: Using CSS with HTML <blockquote> tag.

<!DOCTYPE html>
<html>
<head>
<style>  
blockquote{   
background-color: crimson; 
color: white;
padding: 10px;  
margin-right: 25px;}  
cite{  
color: crimson;}  
</style>  
</head>
 
<body>
<h1>Motivational Quotes</h1>
<blockquote 
cite="https://www.inc.com/jeff-haden/75-inspiring-motivational-quotes-for-being-happier.html">
If you look to others for fulfillment, you will never be fulfilled. 
If your happiness depends on money, you will never be happy with yourself. 
Be content with what you have; rejoice in the way things are. When you realize there is nothing lacking, 
the world belongs to you.
</blockquote>
<cite>-Lao Tzu</cite>  
</body>
</html>

Output:

Explanation:

In the above example, we are using CSS for styling the HTML <blockquote> tag.

Tag specific attributes:

AttributeValueUses
citeURLTo specify the URL of the source of the quotation.

Global Attributes:

All the Global attributes are supported by the HTML <blockquote> tag.

Event Attributes:

All the Event attributes are supported by the HTML <blockquote> tag.

Supporting Browsers:

Chrome, IE, Firefox, Opera and Safari.

Please follow and like us:
error
Posted in HTML   









Copyright © 2019 CodesJava DMCA.com Protection Status