Quotations

Quotations

To include a quotation in an HTML5 document, you can use the <blockquote> and <q> elements.

The <blockquote> element is used for longer quotations that are set apart from the surrounding text. It can be used with the optional cite attribute to provide a source for the quotation. For example:

<blockquote>

<p>Life is like riding a bicycle. To keep your balance, you must keep moving.</p>

<cite>Albert Einstein</cite>

</blockquote>

The <q> element is used for shorter quotations that are inline with the surrounding text. It can also be used with the cite attribute. For example:

<p>As Shakespeare wrote, <q cite=”https://www.sparknotes.com/shakespeare/macbeth/quotes/quote/161″>Out, out, brief candle!</q></p>

Note that the cite attribute is not used for styling purposes, but rather to provide a link to the source of the quotation. It is recommended to use it whenever possible.

HTML and XHTML requires all values to be in quotation marks, as shown below

Get industry recognized certification – Contact us

Menu