Code has been added to clipboard!

HTML Quote Tag

Reading time 1 min
Published Jun 29, 2017
Updated Oct 3, 2019

HTML Quote Tag: Main Tips

  • HTML q tags surround an inline quotation element that doesn't need paragraph breaks.
  • For a longer quote, you may use <blockquote> tags that create a block quotation element.
  • You must include both starting and ending HTML quote tags.
  • q tags are used with the cite attribute and also support global ones.

Using q Tags

HTML quote tags indicate that the enclosed text is an inline quotation:

Example
<p>Everyone knows that
  <q cite="https://www.bitdegree.org/learn/html-basics">HTML is an acronym for Hypertext Markup Language.</q>
</p>

Most browsers use these settings to display HTML quote elements by default:

Example
q { 
    display: inline;
}

q:before { 
    content: open-quote;
}

q:after { 
    content: close-quote;
}

As you can see, modern browsers automatically surround the element content with HTML quotation marks. If you're using an older browser, you might need a style rule to add them.

The cite Attribute for HTML Quote

HTML q tags are usually used with the cite attribute which specifies the URL source of the quote. However, it is not displayed by the browser:

Example
<p>It is a clear that
  <q cite="https://www.bitdegree.org">gamified online education boosts motivation.</q>
</p>

Warning: don't confuse this attribute with the <cite> tag, which is used to define the title for a creative work or quote.

Browser Support

Chrome
All
Edge
All
Firefox
1+
IE
All
Opera
All
Safari
All

Mobile Browser Support

Chrome
All
Firefox
4+
Opera
All
Safari
All
Basics
Introduction
Syntax
Editors
Basic Examples
Head Section
<!DOCTYPE>
Tags and Elements
Semantic Elements
Tags Reference
Attributes
Comments
Block and Inline Elements
Forms
Form Elements
Input
Responsive Web Design
Inline Scripts
Uniform Resource Locator
Redirect
XHTML
Geolocation
Drag and Drop
Local Storage
Web Workers
Server-Sent Events
Character Encoding
Text Formatting
Quotation and Citation Elements
Headings
Paragraphs
Links
Tables
Lists
Symbols
Space
Tab
Styles
Computer Code
Layout
Classes
Colors
Images
iframes
Audio Player
Video Player
YouTube Videos
Multimedia
Canvas
SVG
<!-- -->
<a>
<abbr>
<acronym> DEPRECATED
<address>
<applet> DEPRECATED
<article>
<aside>
<audio>
<b>
<base>
<basefont> DEPRECATED
<bdi>
<bdo>
<big> DEPRECATED
<blink> DEPRECATED
<blockquote>
<body>
<br>
<button>
<canvas>
<caption>
<center> DEPRECATED
<cite>
<code>
<col>
<colgroup>
<datalist>
<dd>
<del>
<details>
<dfn>
<dialog>
<dir> DEPRECATED
<div>
<dl>
<dt>
<em>
<embed>
<fieldset>
<figcaption>
<figure>
<font> DEPRECATED
<footer>
<form>
<frame> DEPRECATED
<frameset> DEPRECATED
<h1> – <h6>
<head>
<header>
<hr>
<html>
<i>
<iframe>
<img>
<input>
<ins>
<kbd>
<keygen> DEPRECATED
<label>
<legend>
<li>
<link>
<main>
<map>
<mark>
<menu>
<menuitem> DEPRECATED
<meta>
<meter>
<nav>
<noframes> DEPRECATED
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<pre>
<progress>
<q>
<rp>
<rt>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<small>
<source>
<span>
<strike> DEPRECATED
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<track>
<tt> DEPRECATED
<u>
<ul>
<var>
<video>
<wbr>