HTML <q> Tag
Description
The <q> tag in HTML is used to define short, inline quotations. Unlike block-level quotations, which are meant to stand alone on their own line and are typically implemented using the <blockquote> element, <q> is designed to be embedded within a paragraph or other inline content. When rendered by browsers, the text inside a <q> element is usually enclosed in quotation marks automatically, with the type of quotation mark (single or double) determined by the browser’s locale and language settings.
The <q> element is semantic, meaning it conveys meaning about the content to both browsers and assistive technologies. Using <q> tells the browser and search engines that the text is a quotation, which can help with accessibility, search indexing, and styling. You can also style <q> via CSS to customize how the quotation marks appear, or even remove them entirely if desired.
An example of the <q> element in use would be embedding a quote within a sentence:
<p>As Albert Einstein once said, <q>Imagination is more important than knowledge.</q></p>
In this example, the quoted text appears inline with the surrounding sentence, and most browsers automatically wrap it in quotation marks. The <q> tag is ideal for short quotations, whereas for longer quotations spanning multiple sentences or paragraphs, <blockquote> is more appropriate.
Properties
- Permitted Parents
- Any element that accepts phrasing content
- Content
- Block, inline and text
- Start/End Tags
- Start tag: required, End tag: required
Example
Attributes
- cite
- Indicates the source of the quotation.
Global Attributes
The <q> tag also supports the Global Attributes in HTML5
Event Attributes
The <q> tag also supports the Event Attributes in HTML5
Browser Support
The following information will show you the current browser support for the HTML <q> tag. Hover over a browser icon to see the version that first introduced support for this HTML tag.
This tag is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 26th December 2025
