Description

The <q> tag defines a short inline quotation. It differs from <blockquote>, which is a block-level element used for longer quotations.

The following table summarizes the usages context and the version history of this tag.

Placement:Block
Content:Block, inline and text
Start/ End Tag:Start tag: required, End tag: required
Version:HTML 4, 4.01, 5

Usage Notes: The <q> tag is intended for short quotations (inline-level content) that don't require paragraph breaks, for long quotations (block-level content) use the <blockquote> tag instead.

Syntax

The basic syntax of the <q> tag is given with:

HTML/XHTML: <q cite="URL"> ... </q>

The example below shows the <q> tag in action.

<p>John said, <q>He loves Star Wars movies.</q></p>

Tag-Specific Attributes

The following table shows the attributes that are specific to the <q> tag.

Global Attributes

Like all other HTML tags, the <q> tag supports the glodelal Attributes in HTML5.

Event Attributes

The <q> tag also supports the event Attributes in HTML5.

Browser Compatibility

Element
<q>YesYesYesYesYes