CSS Quotes: The quotes Property, q and Styled Blockquotes
The CSS quotes property chooses which quotation marks a browser draws for the q element and for content: open-quote and close-quote. quotes: auto picks marks that suit the lang attribute, a list of string pairs sets your own marks per nesting level, and quotes: none removes them. A blockquote gets no marks unless you add them.
| Value | Effect |
|---|---|
| auto | Marks suited to the element's language (set with lang) |
| none | open-quote and close-quote draw nothing |
| "“" "”" | One pair, used at every nesting level |
| "“" "”" "‘" "’" | Outer pair, then inner pair for nested quotes |
Updated
Quotation marks are a typography detail most sites get wrong: straight quotes typed into templates, the wrong marks for French or German, or a decorative blockquote mark that screen readers read aloud. Here the quotes property is shown live in several languages, along with clean patterns for pull quotes and testimonials.
Quote marks by language
- English (en)
- French (fr)
- German (de)
- Spanish (es)
- Italian (it)
- Polish (pl)
- Russian (ru)
- Swedish (sv)
- Japanese (ja)
- Chinese (zh)
q {
quotes: auto;
}Quote characters and their CSS escapes
| Mark | Name | CSS escape |
|---|---|---|
| “ ” | Left and right double quotation mark | \201C \201D |
| ‘ ’ | Left and right single quotation mark | \2018 \2019 |
| « » | Double angle quotation marks (guillemets) | \AB \BB |
| ‹ › | Single angle quotation marks | \2039 \203A |
| „ | Double low-9 quotation mark | \201E |
| 「 」 | Corner brackets | \300C \300D |
Custom marks for nested quotes
Two levels with escapes
The outer q uses double marks, the q inside it uses single marks. The escapes produce curly quotes.
<style>
q { quotes: "\201C" "\201D" "\2018" "\2019"; }
</style>
<p>She said, <q>The sign read <q>closed for lunch</q>, so we waited.</q></p>Styled blockquote patterns
Pull quote with a decorative mark and a caption
The big mark uses alternative text set to empty, so it is not read aloud. figure and figcaption tie the quote to its source. Browsers without the alternative text syntax skip that rule and draw no mark.
<style>
figure { margin: 0; padding: 20px 24px; border-left: 4px solid #4F98FB; background: #f1f5f9; border-radius: 0 12px 12px 0 }
blockquote { margin: 0; font: 500 19px/1.5 Georgia, serif; position: relative }
blockquote::before { content: "\201C" / ""; position: absolute; left: -6px; top: -26px;
font-size: 64px; color: #4F98FB; opacity: .35 }
figcaption { margin-top: 10px; font: 14px system-ui; color: #475569 }
</style>
<figure>
<blockquote><p>A pull quote should be short enough to read at a glance.</p></blockquote>
<figcaption>Name of the person quoted, their role</figcaption>
</figure>Blockquote that draws real open and close marks
open-quote and close-quote take part in nesting, so a q inside this blockquote gets the inner marks.
<style>
blockquote { quotes: auto; font-style: italic; margin: 8px 16px }
blockquote::before { content: open-quote; }
blockquote::after { content: close-quote; }
</style>
<blockquote lang="en">Plans change, but <q>good enough</q> rarely is.</blockquote>
How nesting levels work
Every open-quote raises the nesting depth by one and every close-quote lowers it. Depth zero uses the first pair in quotes, depth one the second, and so on. That is why a q inside a q switches from double to single marks in English automatically.
Because depth is tracked across the whole document, an unbalanced open-quote leaves every later quotation one level too deep. Pair them carefully in pseudo-elements, or use the no- variants to adjust depth silently.
Straight quotes versus typographic quotes
The keyboard's " and ' are typewriter marks. Printed text uses curly marks that point towards the quotation: “ and ” for double, ‘ and ’ for single. Generating marks with CSS keeps them consistent even when content editors type straight ones.
Other languages use different shapes and positions: guillemets « » in French, low-high „ “ in German, corner brackets 「 」 in Japanese. quotes: auto with the right lang handles this for q without per-language CSS.
How it works
- Choose a language in the switcher. The sample uses quotes: auto, so your browser picks the marks from lang.
- Switch to custom marks and type your own outer and inner pair to see nesting work.
- Copy the generated quotes rule.
- Use the blockquote patterns below for testimonials and pull quotes.
Tips
- Set lang on the html element, and on any foreign language passage, so auto quotes match the text.
- Use the q element for short inline quotations, and blockquote for longer passages that form their own block.
- When nesting goes deeper than your list of pairs, the last pair is reused.
- Use no-open-quote and no-close-quote to keep nesting levels balanced without drawing a mark, for example across paragraphs.
Frequently asked questions
How do I remove the quotation marks from a q element?
Set q { quotes: none; }. The marks come from the browser's default ::before and ::after content of open-quote and close-quote, and none makes those draw nothing while keeping the element's meaning.
Why does blockquote not show quotation marks?
Browsers add marks automatically only for q. A blockquote is indented by default but unmarked. Add blockquote::before { content: open-quote; } and a matching ::after, or a decorative mark, if your design wants one.
How do I use curly quotes in CSS?
Write the characters directly in a UTF-8 stylesheet, quotes: "“" "”" "‘" "’";, or as escapes such as "\201C" and "\201D". Escapes are handy when an editor or build step mangles non-ASCII characters.
Are quote marks from CSS read by screen readers?
Generated content can be announced by assistive technology, so treat marks as text. A huge decorative mark is better drawn with a background image, an SVG with aria-hidden, or content with empty alternative text: content: "“" / "";.
Related: CSS text styling, HTML comments, line breaks and spaces, CSS selectors cheat sheet, HTML and CSS cheat sheet, How to link CSS to HTML.
Build your site free or see all free tools. On We.Inc you can build your site free, with no card and no trial needed to start. AI building is on paid plans from $19 a month.
More in Guides
- Modern CSS Reset (Annotated)
- CSS Scroll Snap: Carousels and Full-Page Sections
- CSS Selectors Cheat Sheet With a Live Tester
- CSS Sizing Functions: calc(), min(), max(), clamp() and Viewport Units
- CSS Text Overflow: Ellipsis, Line Clamp and Word Breaking
- CSS Text Styling: Fonts, Size, Weight, Underline, Alignment
- CSS Transforms: Rotate, Scale, Translate and Skew
- CSS Transitions and Keyframes, With 20 Copyable Examples
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App