The CSS quotes
property determines the type of quotation marks that will be used in a document. One or more quotation mark pairs are given, with the basic quotation characters being the left-most pair. Each subsequent pair represents the quotation characters used at progressively deeper element nesting contexts.
Values of the content
property are used to specify where the open/close quotation marks should or should not occur - the open-quote
, close-quote
, no-open-quote
, and no-close-quote
values. "Open-quote" refers to the left (first) of a given pair of specified quotes, while "close-quote" refers to the second (right) quote character in the pair. Quotes can be skipped at a particular location by using the "no-close-quote" and "no-open-quote" value. In the event that the quote character nesting depth is not covered in the quotes
property specification, the last valid quotation pair set should be used.
Quotation Characters[]
Example | Character Reference | Unicode | Description |
---|---|---|---|
" | 0022 | ASCII double quote. | |
' | 0027 | ASCII single quote. | |
‹ | 2039 | Single, left angle quote. | |
› | 203A | Single, right angle quote. | |
« | 00AB | Double, left angle quote. | |
» | 00BB | Double, right angle quote. | |
‘ | 2018 | Left quote (single high-6). | |
’ | 2019 | Right quote (single high-9). | |
“ | 201C | Left quote (double high-6). | |
” | 201D | Right quote (double high-9). | |
„ | 201E | Double quote (double low-9). |
Values[]
Value | Description |
---|---|
inherit |
Explicitly sets the value of this property to that of the parent. |
none |
The open-quote and close-quote values of the content property produce no quotations marks.
|
<string> <string> |
Values for the open-quote and close-quote values of the content property are taken from this list of quote mark pairs. The first, or possibly only, pair on the left represents the outermost level of quotation embedding, the pair to the right (if any) is the first level of quote embedding, etc.
|
CSS example:
/* Specify pairs of quotes for two levels in two languages */ q:lang(en) { quotes: '"' '"' "'" "'" } q:lang(no) { quotes: "«" "»" '"' '"' } /* Insert quotes before and after Q element content */ q:before { content: open-quote } q:after { content: close-quote }
blockquote[lang-=en] { quotes: "\201C" "\201D" } blockquote[lang-=fr] { quotes: "\00AB" "\00BB" } blockquote:before { content: open-quote } blockquote:after { content: close-quote }