HTML <q> tag

Updated: 11/13/2018 by Computer Hope
HTML q tag

When writing in HTML, the <q> tag is an inline element used to designate that the enclosed text is a short quotation. It is useful when you need to put a quote onto 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, as well as 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.


Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. The following table shows the only current, unique, HTML attribute for the <q> tag, as well as a description.

Attribute Description
cite Used to designate the source of the quotation.


Edge Internet Explorer Firefox Safari Opera Chrome
All versions All versions All versions All version All versions All versions

Browser, Compatibility, URL, Web design terms