The <q> element represents some phrasing content quoted from another source.


  • 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.


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="">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.

Last modified on 22 July 2011, at 14:58