docs.rodeo

MDN Web Docs mirror

symbols()

{{CSSRef}} 

The symbols() CSS function enables defining counter styles inline, directly as a value of properties such as {{cssxref("list-style")}} , providing a less powerful but simpler alternative to the {{cssxref("@counter-style")}}  method of defining a counter style.

Unlike {{cssxref("@counter-style")}} , which defines a reusable counter style, symbols() is anonymous (i.e., it can only be used once). This function accepts strings and images as values. In comparison, the {{cssxref("@counter-style")}} 's symbols descriptor also accepts identifiers.

Syntax

symbols() = symbols( <symbols-type>? [ <string> | <image> ]+ );

<symbols-type> can be one of the following:

Formal syntax

{{CSSSyntax}} 

Examples

HTML

<ol>
  <li>One</li>
  <li>Two</li>
  <li>Three</li>
  <li>Four</li>
  <li>Five</li>
</ol>

CSS

ol {
  list-style: symbols(cyclic "*" "†" "‡");
}

Result

{{EmbedLiveSample('Examples','100%',200)}} 

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN