🎁 Exclusive offer: Get EXTRA Bits and Celebrate Bybit's 6th Birthday With $2.2M Prize Pool. Act Now!

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.

DataCamp
Pros
  • Easy to use with a learn-by-doing approach
  • Offers quality content
  • Gamified in-browser coding experience
  • The price matches the quality
  • Suitable for learners ranging from beginner to advanced
Main Features
  • Free certificates of completion
  • Focused on data science skills
  • Flexible learning timetable
Udacity
Pros
  • Simplistic design (no unnecessary information)
  • High-quality courses (even the free ones)
  • Variety of features
Main Features
  • Nanodegree programs
  • Suitable for enterprises
  • Paid Certificates of completion
edX
Pros
  • A wide range of learning programs
  • University-level courses
  • Easy to navigate
  • Verified certificates
  • Free learning track available
Main Features
  • University-level courses
  • Suitable for enterprises
  • Verified certificates of completion

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

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

Mobile Browser Support

Browser image
Chrome
All
Browser image
Firefox
4+
Browser image
Opera
All
Browser image
Safari
All