HTML Quotations


The HTML Quotations is used to create quotation in HTML. The HTML <q> tag is used to define a short quotation. It is a block-level element and HTML <blockquote> tag is used to define a section that is quoted from another source. It is also a block-level element.

Syntax

Following is the syntax −

<q>quote</q>

Or

<blockquote>quote</blockquote>

Example

Let us see an example of HTML Quotations −

Live Demo

<!DOCTYPE html>
<html>
<style>
   body {
      color: #000;
      height: 100vh;
      background-color: #8BC6EC;
      background-image: linear-gradient(135deg, #8BC6EC 0%, #9599E2 100%);
      text-align: center;
   }
</style>
<body>
<h1>HTML Quotations</h1>
<q>I'm a quote element with some dummy text.</q>
<blockquote>I'm a block quote element with some dummy text.</blockquote>
</body>
</html>

Output

Updated on: 16-Feb-2021

712 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements