Inline Quotations
Use the <q>
tag for short inline quotations. Browsers typically render inline quotes with quotation marks:
<p>According to the website, <q>HTML is the standard markup language for creating Web pages.</q></p>
Block Quotations
Use the <blockquote>
tag for longer quotations that take up an entire block of text. This tag is typically used for quotes that span multiple lines and is usually indented by browsers:
<blockquote>HTML is easy to learn - You will enjoy it. Moreover, HTML is the foundation of web development.</blockquote>
Specifying a Source for Quotations
To specify the source of a quotation, use the <cite>
tag for the title of a work and the <footer>
element within a <blockquote>
to reference the author or source of the quotation:
<blockquote>
HTML is easy to learn - You will enjoy it. Moreover, HTML is the foundation of web development.
<footer>— Someone Famous, <cite>Introduction to HTML</cite></footer>
</blockquote>
The Abbreviation Tag
While not strictly for quotations, the <abbr>
tag is used to define an abbreviation or acronym, providing a full-text explanation on hover. This tag can be useful for clarifying quotations that contain abbreviations:
<p>The <abbr title="Hypertext Markup Language">HTML</abbr> is the standard markup language for creating web pages.</p>