The quotes CSS property indicates how user agents should render quotation marks.
/* Keyword value */ quotes: none; /* <string> values */ quotes: "«" "»"; /* Set open-quote and close-quote to the French quotation marks */ quotes: "«" "»" "‹" "›"; /* Set two levels of quotation marks */ /* Global values */ quotes: inherit; quotes: initial; quotes: unset;
| Initial value | depends on user agent |
|---|---|
| Applies to | all elements |
| Inherited | yes |
| Media | visual |
| Computed value | as specified |
| Animation type | discrete |
| Canonical order | the unique non-ambiguous order defined by the formal grammar |
Syntax
Values
none- The
open-quoteandclose-quotevalues of thecontentproperty produce no quotation marks. [<string> <string>]+- One or more pairs of
<string>values foropen-quoteandclose-quote. The first pair represents the outer level of quotation, the second pair is for the first nested level, next pair for third level and so on.
Formal syntax
none | [ <string> <string> ]+
Example
HTML
<q>To be or not to be. That's the question!</q>
CSS
q {
quotes: '"' '"' "'" "'";
}
q::before {
content: open-quote;
}
q:after {
content: close-quote;
}
Result
Notes
Starting in Firefox 3.5, the initial value of the quotes property can be read using -moz-initial This wasn't possible in earlier versions of Firefox.
Specifications
| Specification | Status | Comment |
|---|---|---|
| CSS Level 2 (Revision 1) The definition of 'quotes' in that specification. |
Recommendation | Initial definition |
Browser compatibility
| Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|---|
| Basic support | 11 | (Yes) | 1.5 | 8.0 | 4.0 | 9.0 (at least) |
| Feature | Android | Edge | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| Basic support | ? | (Yes) | ? | ? | ? | ? |
See also
Document Tags and Contributors
Tags:
Contributors to this page:
Sebastianz,
DailyAlice,
erikadoyle,
arroutado,
Guillaume-Heras,
Rik,
teoli,
kscarfone,
Sheppy,
ethertank,
FredB,
grendel,
jojomojo,
Jürgen Jeka,
BijuGC
Last updated by:
Sebastianz,