CSS quotes property

Definition and usage

The quotes attribute sets the type of quotes for nested quotations (embedded quotation).

See also:

HTML DOM Reference Manual:quotes attribute

Example

q:lang(en)
  {
  quotes: '"' '"' "'" "'";
  }

HTML code:

<html lang="en">
<head>
</head>
<body>
<p><q>This is a <q>big</q> quote</q></p>
</body>
</html>

Output:

"This is a 'big' quote"

Try it yourself

CSS syntax

quotes: none|string|initial|inherit;

Attribute value

Value Description
none It is specified that the values of "open-quote" and "close-quote" of the "content" attribute will not produce any quotes.
string string string string

Define the quotes to be used.

The first two values specify the nesting of the first-level references, and the last two values specify the nesting of the next-level quotes.

inherit It is specified that the quotes attribute should be inherited from the parent element.

Technical details

Default value: not specified
Inheritance: yes
Version: CSS2
JavaScript syntax: object.style.quotes="none"

Quotation characters

Quotation Mark Characters

Browser support

The numbers in the table indicate the first browser version that fully supports this attribute.

Chrome IE / Edge Firefox Safari Opera
11.0 8.0 1.5 5.1 4.0

Note:If !DOCTYPE has been specified, Internet Explorer 8 (and higher versions) support the quotes attribute.