The CSS reference

"quotes" - css property (v. css 2)

  • Indicates the type of quotation marks for embedded quotations.
  • Initial value: depends on user agent
  • The property is inherited
  • HTML usage: all elements
  • Browsers that support the quotes - property :
    Internet Explorer Mozilla Firefox Opera Google Chrome Apple Safari
    Browser deviation:
    • To work in IE, a DOCTYPE must be declared.

Possible quotes values:

quotes value Comments CSS
none The 'open-quote' and 'close-quote' values of the 'content' property produce no quotation marks. 2
[string string] [sting string].... Values for the 'open-quote' and 'close-quote' values of the 'content' property are taken from this list of pairs of quotation marks (opening and closing). The first (leftmost) pair represents the outermost level of quotation, the second pair the first level of embedding, etc. 2
inherit Will inherit the value from parent specification. 2

Quotes signs:

& Number result Comments
" " double quote
' ' single quote
‹ single, left angle quote
› single, right angle quote
« « double, left angle quote
» » double, right angle quote
‘ left quote (single high-6)
’ right quote (single high-9)
“ left quote (double high-6)
” right quote (double high-9)
„ double quote (double low-9)

Property "quotes" example:

    <style type="text/css">
      span.quotes {
        quotes: "\"" "\"" ;}
      span.quotes:before {
        content: open-quote;}
      span.quotes:after {
        content: close-quote;}
    Indicates the type of quotation marks for
    <span class="quotes">embedded quotations</span>.

Javascript access:

// To SET values ([o] is the target object)
[o].style.quotes="quotes values"
// To GET values you must first get the computed style object
// To get that object in IE or Opera:
var cStyle=[o].currentStyle;
// To get that object in Firefox, Chrome or Safari (w3c-type):
var cStyle=window.getComputedStyle([o],null)
// To GET the property value:;
var value=cStyle.quotes;
/* The returned value is not cross-browser reliable. The value can vary in accuracy and notation, which depends on the browser, whether the value is preset or not and which option that was used to set the value.*/
© 2010 by Finnesand Data. All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the correctness in the pages or source codes.
The risk of using this web-site pages or any program codes from this website is entirely at the individual user.