CSS quotes
property specify which character(s) should be used for the opening and closing quotes.
In the example below, we have used «
for opening quote and »
for closing quote. We can use any character for the opening and closing quotes which we want. Try it out:
Example:
q{ quotes: "«" "»"; }
If quotes are embedded inside other quotes, we can specify the opening and closing quotes for both the outer and the inner quotes individually.
In the example below, the outer quotes are enclosed within(* *)
, and the inner quotes are enclosed within(« »)
. Try it out:
Example:
q{ quotes: "*" "*" "«" "»"; }
CSS Syntax
The quotes
property has the below syntax:
quotes: none|string|initial|inherit;
Property Values
The quotes
property accepts the following values:
none | Specifies no quotation marks. |
string string string string | The first two strings specify opening and closing quotes for outer quotations and the last two strings specify opening and closing quotes for inner(embedded) quotations. |
initial | Sets the quotes property to its default value. |
inherit | Inherits the quotes property from the parent element. |
General Info
Default Value | Depends on browser |
Inherited | Yes |
JavaScript Usage | element.style.quotes = ‘ “«” “»” ‘; |