HTML <q> tag

Updated: 10/11/2017 by Computer Hope

HTML q tagWhen 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.

Tip: For longer sections of quoted text, use the <blockquote> tag.

Example 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

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

Compatibility

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

Browser, Compatibility, URL, Web design terms