HTML <q> tag
When writing in HTML (hypertext markup language), the <q> tag is an inline element used to designate that the enclosed text is a short quotation. It is useful when you must put a quote on a web page that doesn't require paragraph breaks. This tag is usually denoted by a visible quotation marks. The following sections contain information about this tag, including an example of it in use, and related attributes and browser compatibility.
For longer sections of quoted text, use the <blockquote> tag.
Example of <q> code
<p><q>Here is a quotation taken from the Computer Hope website.</q></p>
Example result
Here is a quotation taken from the Computer Hope website.
Attributes
All HTML tags support standard attributes that define the settings of an HTML element. In addition to the standard settings, the <q> tag has the following unique attributes.
Attribute | Description |
---|---|
cite | Used to designate the source of the quotation. |
Compatibility
Edge | Internet Explorer | Firefox | Safari | Opera | Chrome |
---|---|---|---|---|---|
All versions | All versions | All versions | All version | All versions | All versions |
Browser, Compatibility, Container tag, URL, Web design terms