Skip to: content, navigation

q (HTML element)

Spec
Depr. Empty Version
No No HTML 4
Browser support (more…)
IE7 FF1+ SA1.3+ OP9.2+
None Partial Partial Partial

Syntax

<q cite="uri">
</q>

Description

The q element is little brother (or sister) to the blockquote element. Where blockquote creates a distinct block of quoted text, the more svelte q element is used for inline quotations. It’s intended that the browser should insert the necessary quotation marks, the style of which should depend on the language of the document or that section of the document, rather than the author adding quotation marks, which can cause double quotation marks to appear.

The example code above would render as shown in Figure 1.

Figure 1. q in action Example of q element

Example

Here’s an example of the q element in use:

<p>Heck, even Bill Gates is quoted as saying <q>We need
    Microformats,</q> which can only be a good thing for the cause.</p>

Use This For …

This element is used to mark up a quotation, possibly with attribution in the form of a cite attribute, although this is optional.

Compatibility

Internet Explorer Firefox Safari Opera
5.5 6.0 7.0 1.0 1.5 2.0 1.3 2.0 3.0 9.2 9.5
None None None Partial Partial Partial Partial Partial Partial Partial Partial

The q element doesn’t cause any discernible change in the style of text in any browser tested, but it does add the necessary quotation marks in all the browsers that were tested (with the exception of Internet Explorer). The support tables show partial rather than full support because of the browsers’ failure to reveal the information contained in the cite attribute.

In this Section

User-contributed notes

ID:
#2
Contributed:
by brothercake
Date:
Mon, 08 Dec 2008 11:44:58 GMT

Internet Explorer doesn't display quotes, but does that mean the element isn't supported? IE does recognises it for CSS.

Similarly, does not showing the information contained in the cite attribute mean the element is only partially supported? If the information is there in the DOM (which it is), then perhaps, not displaying it is deliberate behavior?

Add a note

To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

Related Products

Search