<q> Quote Tag Syntax

Rules for coding HTML q elements
<body>
   ...
   ... phrasing content expected ...
   <q cite="URL-of-source">... phrasing content ...</q>
   ...
</body>
Rules for coding HTML q elements

Make sure you understand the difference between a tag and element and are familiar with the definitions of namespace and other HTML terms.

  1. Code the q element for an inline quotation where phrasing content is expected.
  2. Begin the q element with a starting <q> tag. The element name uses lower case letters and should be in the HTML namespace, which it will pick up automatically from the xmlns attribute on the <html> tag.
  3. If the source of the quotation is available online, include the optional cite attribute with the URL of the source of the quotation.
  4. Include any HTML global attributes on the <q> tag as appropriate.
  5. Inside the q element, between the starting <q> tag and the ending </q> tag, code the inner HTML phrasing content with the text of the quotation. Do not include any quotation marks, either inside the q element or outside it.
  6. End the q element with a matching </q> closing tag.
Content Model
Content of the q element

The content of the q element can include HTML comments, text content and only those HTML tags that can be used in phrasing content.