Next / Previous / Contents / TCC Help System / NM Tech homepage

10.12. q: Inline quotations

For quoting text within a paragraph, wrap the quoted text in a q element. Quote marks will be added for you; you don't have to include your own. Here's an example:

  Don't ever say <q>Don't ever say <q>Don't ever say

The browser will even handle quotes within quotes correctly, shifting from double to single quotes. The above example will be rendered as:

Don't ever say “Don't ever say ‘Don't ever say that.

  As the Tasmanians say, <q xml:lang='fr'>C'est la vie.</q>

In the above example, the xml:lang attribute specifies that the quote itself is in French.

The q element also allows a cite attribute so that you can link to a URI. For example, you may want to link the quote back to its source on the Web. Example:

<acronym>GIGO</acronym> stands for <q
In, Garbage Out</q>.