quotes

  • Revision slug: CSS/quotes
  • Revision title: quotes
  • Revision id: 357335
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{ CSSRef() }}

Summary

The quotes CSS property indicates how user agents should render quotation marks.

  • {{ Xref_cssinitial() }} {{cssinitial("quotes")}}
  • Applies to all elements
  • {{ Xref_cssinherited() }} yes
  • Media {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }} as specified

Syntax

Formal syntax: {{csssyntax("quotes")}}
quotes: none
quotes: "«"     /* Set open-quote  to "«" (French opening quotation mark) */
quotes: "»"     /* Set close-quote to "»" (French closing quotation mark) */
quotes: "«" "»" /* Set both open-quote and close-quote */

quotes: inherit

Values

none
The open-quote and close-quote values of the content property produce no quotation marks.
[<string> <string>]+
One or more pairs of {{ Xref_cssstring() }} values for open-quote and close-quote. The first pair represents the outer level of quotation, the second pair is for the first nested level, next pair for third level and so on.

Examples

q { quotes: '"' '"' "'" "'" }
q:before { content: open-quote }
q:after  { content: close-quote }

Notes

Starting in Firefox 3.5, the initial value of the quotes property can be read using -moz-initial This wasn't possible in earlier versions of Firefox.

Specifications

Specification Status Comment
{{ SpecName('CSS2.1', 'generate.html#quotes', 'quotes') }} {{ Spec2('CSS2.1') }}  

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 11 1.5 8.0 4.0 {{ CompatUnknown() }}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

See also

  • {{ Cssxref("content") }}

Revision Source

<div>
  {{ CSSRef() }}</div>
<h2 id="Summary" name="Summary">Summary</h2>
<p>The <code>quotes</code> <a href="/en-US/docs/CSS" title="CSS">CSS</a> property indicates how user agents should render quotation marks.</p>
<ul class="cssprop">
  <li><dfn>{{ Xref_cssinitial() }}</dfn> {{cssinitial("quotes")}}</li>
  <li><dfn>Applies to</dfn> all elements</li>
  <li><dfn>{{ Xref_cssinherited() }}</dfn> yes</li>
  <li><dfn>Media</dfn> {{ Xref_cssvisual() }}</li>
  <li><dfn>{{ Xref_csscomputed() }}</dfn> as specified</li>
</ul>
<h2 id="Syntax" name="Syntax">Syntax</h2>
<pre class="twopartsyntaxbox">
<a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("quotes")}}</pre>
<pre>
quotes: none
quotes: "«"     /* Set <em>open-quote</em>  to "«" (French opening quotation mark) */
quotes: "»"     /* Set <em>close-quote</em> to "»" (French closing quotation mark) */
quotes: "«" "»" /* Set both <em>open-quote</em> and <em>close-quote</em> */

quotes: inherit
</pre>
<h3 id="Values" name="Values">Values</h3>
<dl>
  <dt>
    none</dt>
  <dd>
    The <code>open-quote</code> and <code>close-quote</code> values of the content property produce no quotation marks.</dd>
  <dt>
    [&lt;string&gt; &lt;string&gt;]+</dt>
  <dd>
    One or more pairs of {{ Xref_cssstring() }} values for <code>open-quote</code> and <code>close-quote</code>. The first pair represents the outer level of quotation, the second pair is for the first nested level, next pair for third level and so on.</dd>
</dl>
<h2 id="Examples" name="Examples">Examples</h2>
<pre class="brush:css">
q { quotes: '"' '"' "'" "'" }
q:before { content: open-quote }
q:after  { content: close-quote }
</pre>
<h2 id="Notes" name="Notes">Notes</h2>
<p>Starting in Firefox 3.5, the initial value of the quotes property can be read using <code>-moz-<a class="internal" href="/en-US/docs/CSS/initial" title="en-US/docs/CSS/initial">initial</a></code> This wasn't possible in earlier versions of Firefox.</p>
<h2 id="Specifications" name="Specifications">Specifications</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{ SpecName('CSS2.1', 'generate.html#quotes', 'quotes') }}</td>
      <td>{{ Spec2('CSS2.1') }}</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_Compatibility" name="Browser_Compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari (WebKit)</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>11</td>
        <td>1.5</td>
        <td>8.0</td>
        <td>4.0</td>
        <td>{{ CompatUnknown() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Phone</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
        <td>{{ CompatUnknown() }}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also" name="See_also">See also</h2>
<ul>
  <li>{{ Cssxref("content") }}</li>
</ul>
Revert to this revision