10 HTML Quotations
10 HTML Quotations
Quotations in HTML allow you to include and format quoted text within your web content. HTML
provides tags such as <blockquote>, <q>, <cite>, <address>, <bdo> and <abbr> to structure and
style quotes.
These tags help maintain proper formatting and semantics, enhancing the presentation and
meaning of quoted content on web pages. Incorporating quotes is essential for conveying
information accurately and providing a well-organized reading experience for users.
We can also use the cite attribute inside the <blockquote> tag to indicate the source of the
quotation in URL form.
Syntax
Example
<!DOCTYPE html>
<html>
<head>
<title>HTML Quotation tag</title>
</head>
<body>
<p>DLF stands for <q>Delhi Land and Finance</q></p>
<p>Delhi Land and Finance is one of the largest commercial real esta
</body>
</html>
Example
In the example below, we used <q> tag on a particular text inside the <h1> tag.
<!DOCTYPE html>
<html>
<head>
<title>HTML u tag</title>
</head>
<body>
<h1>Welcome to <q> INDIA </q> Kids.</h1>
</body>
</html>
We can also use the cite attribute inside the <blockquote> tag to indicate the source of the
quotation in URL form.
Syntax
Example
<!DOCTYPE html>
<html>
<head>
<title>HTML blockquote tag</title>
</head>
<body>
<p>DLF stands for Delhi Land and Finance</p>
<blockquote>Delhi Land and Finance is one of the largest commercial
</body>
</html>
Example
Following is the example program when we use cite attribute inside the <blockquote> tag.
<!DOCTYPE html>
<html>
<head>
<title>HTML blockquote tag</title>
</head>
<body>
<h1>Tutorialspoint</h1>
<p>Here is a quotation from Tutorialspoint’s official website</p>
<blockquote cite="https://www.tutorialspoint.com">Join our millions
</body>
</html>
Example
Following is the example program when we changed the style of <blockquote> tag by using CSS.
<!DOCTYPE html>
<html>
<head>
<title>HTML blockquote tag</title>
<style>
blockquote {
margin-left: 0;
}
</style>
</head>
<body>
<h1>Tutorialspoint</h1>
<p>Here is a quotation from Tutorialspoint’s official website</p>
<blockquote cite="https://www.tutorialspoint.com">Join our millions
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Cite Tag Example</title>
</head>
<body>
<p>The information is sourced from <cite>The Elements of Style</cite
</body>
</html>
In this example, '<cite>' is used to indicate the title of the referenced book.
<!DOCTYPE html>
<html>
<head>
<title>Address Tag Example</title>
</head>
<body>
<address>
Contact us at: <a href="mailto:[email protected]">[email protected]</a
Visit us at: 123 Main Street, Cityville
</address>
</body>
</html>
In this example, the '<address>' tag is used to provide contact information, including an email link
and a physical address.
In this example, the text within the '<bdo>' tag is displayed from right to left, overriding the default
left-to-right direction.
<!DOCTYPE html>
<html>
<head>
<title>Abbreviation Tag Example</title>
</head>
<body>
<p>My best friend's name is <abbr title="Abhishek">Abhy</abbr>.</p>
</body>
</html>
In this example, <abbr> is used to abbreviate the name "Abhishek" to "Abhy," and the 'title'
attribute provides the full description of the abbreviation.