Contents
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 thecite
attribute and also support global ones.
Using q Tags
HTML quote tags indicate that the enclosed text is an inline quotation:
<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:
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.
- 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
- Free certificates of completion
- Focused on data science skills
- Flexible learning timetable
- Simplistic design (no unnecessary information)
- High-quality courses (even the free ones)
- Variety of features
- Nanodegree programs
- Suitable for enterprises
- Paid Certificates of completion
- A wide range of learning programs
- University-level courses
- Easy to navigate
- Verified certificates
- Free learning track available
- 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:
<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.