CSS Portal

CSS quotes Property

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The quotes property defines the quotation marks that the user agent and CSS generated content will insert for quoted text and nested quotations. Instead of relying on a browser’s default quotation characters, authors can supply a language- or typographic-specific sequence of opening/closing mark pairs to be used for successive levels of nesting. This makes it possible to adapt the visual appearance of quotations to regional conventions (for example, single vs. double marks, angle quotes, or other glyphs) without changing the actual textual content.

When the property is present, those mark pairs are consumed by the mechanisms that insert quotation marks automatically - most commonly the browser’s default styling for the inline quote element and any generated content that requests quote marks via the appropriate generated-content keywords. For that insertion to happen authors normally rely on the content mechanism (often used in pseudo-elements) or leave the default UA styling in place; the quotes property itself simply supplies the strings to be used. Because the property supplies a sequence of pairs, it defines what appears at each nested quotation level; if a document nests deeper than the number of supplied pairs, user-agent fallback rules determine the marks used.

From a stylesheet-design perspective, quotes is inherited and so can be set on a root element and flow naturally to descendants, which is useful for pages or sections that need consistent quoting conventions. It does not change the semantics of the markup - screen readers and other assistive technologies treat quoted content according to semantics rather than visual marks - so authors should not rely on visual quotation marks alone for meaning. Also consider writing direction: when text direction changes, the visual ordering and choice of marks may need to reflect right-to-left conventions, so coordinate quotes with document directionality (see direction) and typographic practice to ensure quotations read correctly.

Definition

Initial value
Depends on browser/user agent
Applies to
All elements
Inherited
Yes
Computed value
Specified value
Animatable
No
JavaScript syntax
object.style.quotes

Interactive Demo

Show us the wonder-working Brothers, let them come out publicly—and we will believe in them!

Syntax

quotes: [<string> <string>]+ | none

Values

  • noneThe 'open-quote' and 'close-quote' values of the 'content' property produce no quotations marks, as if they were 'no-open-quote' and 'no-close-quote' respectively.
  • [<string> <string>]+Values for the 'open-quote' and 'close-quote' values of the 'content' property are taken from this list of pairs of quotation marks (opening and closing). The first (leftmost) pair represents the outermost level of quotation, the second pair the first level of embedding, etc.
  • inherit

Example

<div class="container">
<p>The scientist said, <q>We have discovered a new element.</q></p>
<p>In French style, it looks like this: <q class="french">C'est la vie.</q></p>
</div>
/* Standard quotes (English style) */
q {
  quotes: "“" "”" "‘" "’";
}

/* Custom quotes (French style) */
q.french {
  quotes: "« " " »";
}

/* Applying the quotes to the element */
q:before {
  content: open-quote;
}

q:after {
  content: close-quote;
}

Browser Support

The following information will show you the current browser support for the CSS quotes property. Hover over a browser icon to see the version that first introduced support for this CSS property.

This property 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
-

Last updated by CSSPortal on: 1st January 2026

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!