The quotes property lets you choose quotation mark characters for nested text. It works with the content property and keywords open-quote and close-quote.
01
auto
Language default.
02
none
No quotes.
03
Pairs
Custom marks.
04
Nested
Multiple levels.
05
content
open/close-quote.
06
<q>
Inline quotes.
Fundamentals
Introduction
The quotes property in CSS is used to define the type of quotation marks to be used for the content property in pseudo-elements like ::before and ::after.
This property allows you to specify which quotation marks should be used for nested quotations, providing greater control over the typography and style of your text content.
Definition and Usage
Browsers can add quote marks to the <q> element automatically, but custom typography often needs curly quotes, guillemets, or other regional styles.
Set quotes on a container such as blockquote, then insert marks with content: open-quote and content: close-quote on pseudo-elements or nested <q> tags.
💡
Beginner Tip
quotes only defines the characters. You still need content: open-quote or close-quote (or a <q> element) to display them.
Foundation
📝 Syntax
The syntax for the quotes property involves specifying a list of pairs of opening and closing quotes.
Each pair is one open string followed by one close string.
The first pair applies to the outermost quotation level.
Additional pairs apply to deeper nested quotes.
none turns off quote generation for that element.
auto uses language-appropriate marks from the browser.
Use with ::before, ::after, or <q> pseudo-elements.
Defaults
🎯 Default Value
The default value of the quotes property is dependent on the browser’s default settings, which typically use standard quotation marks for the language of the document.
In CSS, the initial value is auto, so quote characters usually follow the document language unless you override them.
Uses quotation marks appropriate to the document language.
none
quotes: none;
No quotes will be used.
[open close]+
quotes: "\201C" "\201D" "\2018" "\2019";
Specifies pairs of opening and closing quotes for different levels of quotation.
autonone"\201C" "\201D"open-quoteclose-quote
Context
When Does quotes Matter?
quotes is the right tool when quotation typography should be consistent:
Editorial sites — Match print-style curly quotes on pull quotes.
Nested dialogue — Switch to single quotes inside double quotes automatically.
Localized content — Use guillemets or other regional quote styles.
Minimal UI — Remove default <q> marks with none.
For body text, good typography often beats hard-coded quote characters typed into HTML.
Preview
👀 Live Preview
Outer quotes use “ ” and nested <q> uses ‘ ’ via two quote pairs.
Good typography respects quotation hierarchy. Nested quotes should look different from the outer quote.
Hands-On
Examples Gallery
Start with the reference blockquote, disable quotes, try guillemets, and build a pull quote with pseudo-elements.
📝 Custom Quotation Marks
Define quote pairs and display them with open-quote and close-quote — matching the reference example.
Example 1 — Blockquote with Custom Quotes
In this example, we’ll define custom quotes for blockquotes and nested quotes.
quotes-blockquote.html
<style>blockquote{quotes:"\201C""\201D""\2018""\2019";}blockquote::before{content:open-quote;}blockquote::after{content:close-quote;}blockquote q::before{content:open-quote;}blockquote q::after{content:close-quote;}</style><blockquote>
This is a blockquote with custom quotes.
<q>This is a nested quote within the blockquote.</q></blockquote>
Set quotes on a container with one or more open-close pairs.
quotes
2
Request open or close marks
Use content: open-quote or close-quote in CSS.
content
3
Nesting picks the next pair
Deeper nested quotes automatically use the next pair in the list.
Nesting
=
★
Polished typography
Consistent, nest-aware quotation marks without typing every character by hand.
Compatibility
Browser Compatibility
The quotes property is supported in most modern browsers, including the latest versions of Chrome, Firefox, Safari, Edge, and Opera. However, it is always a good practice to test your website across different browsers to ensure compatibility.
✓ Typography · Broad support
Reliable quotes support
Chrome, Firefox, Safari, Edge, and Opera support quotes with open-quote and close-quote.
97%Modern browser support
Google Chrome1+ · Desktop & Mobile
Full support
Mozilla Firefox1.5+ · Desktop & Mobile
Full support
Apple Safari1+ · macOS & iOS
Full support
Microsoft Edge12+ · All versions
Full support
Opera4+ · Modern versions
Full support
Testing tip
Verify nested <q> elements in Safari and Firefox if you rely on more than two quote levels.
quotes property97% supported
Bottom line:quotes is safe for custom blockquote and inline quote typography in modern browsers.
Wrap Up
Conclusion
The quotes property in CSS is a useful tool for controlling the appearance of quotation marks in your web content.
By defining custom quotes, you can enhance the readability and aesthetic appeal of your text, especially when dealing with nested quotations. Experiment with different styles and see how this property can improve the typography of your web projects.
Provide two pairs for double-then-single nested quotes
Use Unicode escapes for precise curly or guillemet characters
Pair quotes with content: open-quote / close-quote
Match quote style to the document language and tone
❌ Don’t
Type decorative quotes directly into HTML when CSS can manage nesting
Forget pseudo-elements when custom marks do not appear
Use straight keyboard quotes when curly quotes are expected
Assume quotes alone adds visible marks without content
Remove quotes without checking screen reader semantics
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about quotes
Use these points when styling quotation marks.
5
Core concepts
★01
auto Default
Language marks.
Default
⚙02
Pairs
Custom chars.
Pattern
◉03
Nesting
Level by level.
Use case
▦04
content
open/close-quote.
Companion
❝05
none
Disable marks.
Option
❓ Frequently Asked Questions
quotes defines which quotation mark characters are used for open-quote and close-quote in the content property. It also controls quote marks on nested quotations when used with the q element or pseudo-elements.
Set quotes on the element, then use ::before { content: open-quote; } and ::after { content: close-quote; }. The browser inserts the correct pair for each nesting level.
The initial value is auto, which uses quotation marks appropriate to the document language. Browsers may also apply language-specific defaults.
quotes: none disables automatic quotation marks. Paired with content: none on q pseudo-elements, it removes quote characters entirely.
Yes. Provide multiple open-close pairs in one declaration. The first pair is for the outer quote, the second for the next nested level, and so on.