HTML Quotations

0
27
HTML Quotations

HTML Quotations –

  • We use the Quotation elements in HTML when we need to insert quoted texts in a web page.
  • There are some of the most used quotation elements of HTML, are listed below, have a look.

<q> element : HTML Quotations

The <q> element is used when we want to set some text inside the quotation marks. It contains both the opening tags and closing tags.

Example – 

<!DOCTYPE html> 
<html> 
<head> 
	<title> Quotation elements  </title> 
</head> 
<body> 
	<h3>MrTechCode</h3> 
	<p> This is my first Paragraph in html <br></p> 
	<!--we use quotes here-->
	<p><q> This text should be shown in Quotation marks. </q></p> 
</body> 
</html> 

Output Will be of this code :

html Quotations element

<blockquote> element: 

The <blockquote> element is also used for quotations but, it  makes changes in the alignment of text to be shown as unique text from others. It contains both opening and closing tags.

Example –

<!DOCTYPE html> 
<html> 
<head> 
	<title>Blockquote Element</title> 
</head> 
<body> 
	<h3>MrTechCode</h3> 
	<p>This is my first Paragraph in html<br></p> 
	<!--we use blockquotes here-->
	<p>
          <blockquote>This text should be shown in Quotation marks.
          </blockquote>
        </p> 
</body> 
</html> 

Output Will be : 

blockquote tag

<address> element:

Using the <address> element, we want to define an address in a webpage and the text is written between <address> tags then, text will be emphasized. It contains both opening and closing tags.

Example : 

<!DOCTYPE html> 
<html> 
<head> 
	<title>Using Address Tag</title> 
</head> 
<body> 
	<h3>MrTechCode</h3> 
	<address> 
	<p>Address:<br> 
	SriGangaNagar,<br> 
	Rajasthan, 335001, India </p> 
	</address> 
</body> 
</html> 

Output Will be :

address tag

<abbr> element:

The <abbr> element is used when we want define a text as an acronym or abbreviations. The title attribute is used to display the abbreviation/acronym when you take mouse over the text which is written in <abbr> element. It contains both opening and closing tags.

Example : 

<!DOCTYPE html> 
<html> 
<head> 
	<title>Abbreviations Tags </title> 
</head> 
<body> 
	<h3>MrTechCode</h3> 
	<p>Welcome to <abbr title="MrTechCode"> MTC </abbr></p> 
</body> 
</html> 

Output Will be :

abbr tag

<bdo> element: 

The <bdo> element is used when we want to define a bidirectional override.  bidirectional override means that the text written from right to left or left to right. It contains both opening and closing tags. It is useful for over-ride the current text direction. It has an attribute that is “rtl” to show the text from right to left.

Example : 

<!DOCTYPE html> 
<html> 
<head> 
	<title>Bidirectional Tags</title> 
</head> 
<body> 
	<h3>MrTechCode</h3> 
	<!--this is a Normal text-->	
	<p> I Want to learn html language <br></p> 
	<!--this is text written Inside <bdo> tag-->
	<p><bdo dir="rtl">I Want to learn html language </bdo></p> 
</body> 
</html> 

Output Will Be like :

bdo tags

<cite> element : HTML Quotations

This element is used when we are defining a title of a work and emphasizes a text.
Example:

<!DOCTYPE html> 
<html> 
<head> 
	<title>Cite Tags</title> 
</head> 
<body> 
	<h3>MrTechCode</h3> 
	<!--this is a Normal text-->	
	<p> I Want to learn html language <cite>MrtechCode</cite> is helping me......</p> </body> </html>

Output Will Be like :

cite tag

Thanks for reading Artical – HTML Quotations

Check Our All HTML Artcals

LEAVE A REPLY

Please enter your comment!
Please enter your name here