CSS Portal

HTML <q> Tag

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
<q>
HTML TagThis tag is supported by all modern browsers.
Updated 26th December 2025

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

<q>You can only be young once. But you can always be immature.</q> (Dave Barry)
Open in editor

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

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee