Style quotes attribute

Definition and usage

quotes Attribute to set or return the type of quotation marks for nested quotations (embedded quotation).

See also:

CSS Reference Manual:quotes attribute

Instance

Example 1

Change quotation marks:

document.getElementById("myQ").style.quotes = "'\253' '\273'";

Try it yourself

Example 2

Return quotes attribute:

alert(document.getElementById("myQ").style.quotes);

Try it yourself

Syntax

Return quotes attribute:

object.style.quotes

Set quotes attribute:

object.style.quotes = "none|string string string string|initial|inherit"

Attribute value

Value Description
none Specify that the values of the "open-quote" and "close-quote" of the "content" attribute will not produce any quotation marks. Default.
string string string string

Specify the quotation marks to be used.

The first two values specify the first-level reference nesting, and the last two values specify the next-level quotation nesting.

initial Set this attribute to its default value. See also initial.
inherit This attribute inherits from its parent element. See also inherit.

Technical details

Default value: None
Return Value: A string that indicates the type of quotes used for embedded references.
CSS Version: CSS2

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support