list-style

  • Revision slug: CSS/list-style
  • Revision title: list-style
  • Revision id: 293539
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{ CSSRef() }}

Summary

The list-style CSS property is a shorthand property for setting {{ cssxref("list-style-type") }}, {{ cssxref("list-style-image") }} and {{ cssxref("list-style-position") }}.

  • {{ Xref_cssinitial() }}: see individual properties for details
  • Applies to: elements with display: list-item
  • {{ Xref_cssinherited() }}: no
  • Media: {{ Xref_cssvisual() }}
  • {{ Xref_csscomputed() }}: see individual properties

Syntax

list-style:  list-style-type || list-style-position || list-style-image 

Values

Accepts one, two or three keywords in any order.

list-style-type
See {{ cssxref("list-style-type") }}
list-style-image
See {{ cssxref("list-style-image") }}
list-style-position
See {{ cssxref("list-style-position") }}

Examples

{{ CSSLiveSample("list-style") }}

ul { list-style: circle; }
#foo { list-style: square inside; }

Specifications

Specification Status Comment
{{ SpecName('CSS3 Lists', '#list-style', 'list-style') }} {{ Spec2('CSS3 Lists') }} No change.
{{ SpecName('CSS2.1', 'generate.html#propdef-list-style', 'list-style') }} {{ Spec2('CSS2.1') }} Initial definition.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 {{ CompatGeckoDesktop("1") }} 4.0 7.0 1.0
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 1.0 {{ CompatGeckoMobile("1") }} 6.0 6.0 1.0

See Also

  • {{ Cssxref("list-style-type") }}, {{ Cssxref("list-style-image") }}, {{ Cssxref("list-style-position") }}

Revision Source

<p>{{ CSSRef() }}</p>
<h2 id="Summary" name="Summary">Summary</h2>
<p>The<code> list-style </code>CSS property is a shorthand property for setting {{ cssxref("list-style-type") }}, {{ cssxref("list-style-image") }} and {{ cssxref("list-style-position") }}.</p>
<ul class="cssprop">
  <li><dfn>{{ Xref_cssinitial() }}:</dfn> see individual properties for details</li>
  <li><dfn>Applies to:</dfn> elements with<code> display: list-item</code></li>
  <li><dfn>{{ Xref_cssinherited() }}:</dfn> no</li>
  <li><dfn>Media:</dfn> {{ Xref_cssvisual() }}</li>
  <li><dfn>{{ Xref_csscomputed() }}:</dfn> see individual properties</li>
</ul>
<h2 id="Syntax" name="Syntax">Syntax</h2>
<pre>
list-style:  list-style-type || list-style-position || list-style-image </pre>
<h3 id="Values" name="Values">Values</h3>
<p>Accepts one, two or three keywords in any order.</p>
<dl>
  <dt>
    list-style-type</dt>
  <dd>
    See {{ cssxref("list-style-type") }}</dd>
  <dt>
    list-style-image</dt>
  <dd>
    See {{ cssxref("list-style-image") }}</dd>
  <dt>
    list-style-position</dt>
  <dd>
    See {{ cssxref("list-style-position") }}</dd>
</dl>
<h2 id="Examples" name="Examples">Examples</h2>
<p>{{ CSSLiveSample("list-style") }}</p>
<pre>
ul { list-style: circle; }
</pre>
<pre>
#foo { list-style: square inside; }</pre>
<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('CSS3 Lists', '#list-style', 'list-style') }}</td>
      <td>{{ Spec2('CSS3 Lists') }}</td>
      <td>No change.</td>
    </tr>
    <tr>
      <td>{{ SpecName('CSS2.1', 'generate.html#propdef-list-style', 'list-style') }}</td>
      <td>{{ Spec2('CSS2.1') }}</td>
      <td>Initial definition.</td>
    </tr>
  </tbody>
</table>
<h2 id="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</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>1.0</td>
        <td>{{ CompatGeckoDesktop("1") }}</td>
        <td>4.0</td>
        <td>7.0</td>
        <td>1.0</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>1.0</td>
        <td>{{ CompatGeckoMobile("1") }}</td>
        <td>6.0</td>
        <td>6.0</td>
        <td>1.0</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_Also" name="See_Also">See Also</h2>
<ul>
  <li>{{ Cssxref("list-style-type") }}, {{ Cssxref("list-style-image") }}, {{ Cssxref("list-style-position") }}</li>
</ul>
Revert to this revision