HTML and CSS Reference
In-Depth Information
By default, the browser will insert the proper quotation marks for us and will even change
the quotation marks based on the language identified within the
lang
global attribute.
Here's an example:
1.
<p>Steve Jobs once said, <q>One home run is much better than two
doubles.</q></p>
Dialogue & Prose Citation
An optional attribute to include on the
<q>
element is the
cite
attribute. The
cite
attrib-
ute acts as a citation reference to the quote in the form of a URL. This attribute doesn't alter
the appearance of the element; it simply adds value for screen readers and other devices.
Because the attribute isn't viewable within the browser, it's also helpful to provide a hyper-
link to this source next to the actual quotation.
Here's an example, which can also be seen in
Figure 6.8
:
1.
<p><a href="http://www.businessweek.com/magazine/content/
06_06/b3970001.htm">Steve Jobs</a> once said, <q
cite="http://www.businessweek.com/magazine/content/06_06/b3970001.
htm">One home run is much better than two doubles.</q></p>
Figure 6.8
An inline quotation by Steve Jobs referenced from
Businessweek
External Quotation
To quote a large block of text that comes from an external source and spans several lines,
we'll use the
<blockquote>
element. The
<blockquote>
is a block-level element
that may have other block-level elements nested inside it, including headings and para-
graphs.
Here's an example that uses the
<blockquote>
element:
1.
<blockquote>
2.
<p>“In most people’s vocabularies, design is a
veneer. It’s interior decorating. It’s the fabric of
the curtains, of the sofa. But to me, nothing could be further
from the meaning of design. Design is the fundamental soul of a
human-made creation that ends up expressing itself in successive
Search WWH ::
Custom Search