Warning:
This wiki has been archived and is now read-only.
Elements/q
From HTML Wiki
< Elements
Contents
<q>
The <q> element represents some phrasing content quoted from another source.
Point
- Content inside a q element must be quoted from another source. If it has address, a cite attribute should present. [Example B]
- The use of q elements to mark up quotations is entirely optional; using explicit quotation punctuation without q elements is just as correct. [Example C]
HTML Attributes
-
cite
= valid URL potentially surrounded by spaces
Specifies the address in the quotation source. [Example B]
See also global attributes.
Examples
Example A
[try it]
<p>The man said <q>The quote is input here</q>.</p>
Example B
With the cite attribute [try it]:
<p>The man said <q cite="http://www.quote.com/sample.html">The quote is input here</q>.</p>
Example C
In the following example, quotation marks are used instead of the q element [try it]:
<p>The man said "The quote is input here".</p>
HTML Reference
The HTML5 specification defines the <q> element in 4.6.7 The q element.