Favorites

symbols() CSS Function

symbols()
CSS FunctionThis function is supported in some modern browsers, but not all.
Updated 21st November 2026

The symbols() function defines an anonymous counter style inline, for list markers, without an @counter-style rule.

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.

Description

The symbols() CSS function defines an anonymous counter style inline, directly where it is used, without a separate @counter-style rule. It can be used as a value of list-style-type (and the list-style shorthand), and as the style argument of counter() and counters().

The first, optional argument is the counter system, which decides how the symbols are used. cyclic (the default for this function) repeats the symbols in a loop. numeric treats them as digits of a number system, so symbols(numeric "0" "1") counts in binary. alphabetic works like lettered lists (a, b, ... z, aa, ab). symbolic repeats the symbol more each time round (*, **, ***). fixed uses each symbol once and then falls back to decimal numbers. The symbols themselves are strings or images.

Counter styles made with symbols() have no prefix and use a single space as the suffix. For reusable styles, or to control the suffix, prefix, range and padding, define a named style with @counter-style instead.

/* Repeating custom bullets */
ul.stars {
  list-style: symbols(cyclic "\2605" "\2606");   /* filled and empty stars */
}

/* Binary numbering */
ol.binary {
  list-style: symbols(numeric "0" "1");
}

/* In generated content */
h2::before {
  content: counter(section, symbols(alphabetic "A" "B" "C")) ". ";
}

Syntax

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

<symbols-type> = cyclic | numeric | alphabetic | symbolic | fixed

Values

  • cyclicDefault. Cycles through the symbols repeatedly.
  • numericTreats the symbols as digits of a place-value number system. At least two symbols are needed.
  • alphabeticTreats the symbols as letters of an alphabet (a ... z, aa, ab ...). At least two symbols are needed.
  • symbolicCycles through the symbols, doubling, tripling and so on each time round.
  • fixedUses each symbol once, then falls back to decimal numbering.
  • <string> | <image>The symbols to use, as quoted strings or images.

Example

<div class="wrap">
<h1>CSS symbols() examples</h1>
<div class="grid">
<div class="card">
<ul class="stars"><li>One</li><li>Two</li><li>Three</li><li>Four</li></ul>
<div class="label">symbols(cyclic "\2605" "\2606")</div>
</div>
<div class="card">
<ol class="binary"><li>One</li><li>Two</li><li>Three</li><li>Four</li><li>Five</li></ol>
<div class="label">symbols(numeric "0" "1")</div>
</div>
<div class="card">
<ol class="alpha"><li>One</li><li>Two</li><li>Three</li><li>Four</li><li>Five</li></ol>
<div class="label">symbols(alphabetic "x" "y" "z")</div>
</div>
<div class="card">
<ol class="symbolic"><li>One</li><li>Two</li><li>Three</li><li>Four</li></ol>
<div class="label">symbols(symbolic "*" "\2020")</div>
</div>
</div>
<p class="note">Browsers without symbols() show their default markers.</p>
</div>
/* Base demo layout */
* { box-sizing: border-box; }

body {
margin: 24px;
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
background: #f5f7fb;
color: #102a43;
}

.wrap {
max-width: 860px;
margin: 0 auto;
}

h1 {
font-size: 20px;
margin: 0 0 16px;
}

.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 16px;
}

.card {
background: #fff;
border-radius: 12px;
padding: 16px;
box-shadow: 0 6px 18px rgba(16, 42, 67, 0.08);
}

.label {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
font-size: 12px;
color: #486581;
margin-top: 10px;
word-break: break-word;
}

.note {
font-size: 13px;
color: #486581;
margin-top: 14px;
}

/* symbols() examples */
ul, ol {
margin: 0;
padding-left: 32px;
line-height: 1.8;
}

.stars { list-style: symbols(cyclic "\2605" "\2606"); }
.binary { list-style: symbols(numeric "0" "1"); }
.alpha { list-style: symbols(alphabetic "x" "y" "z"); }
.symbolic { list-style: symbols(symbolic "*" "\2020"); }
Open in editor

Browser Support

The following information will show you the current browser support for the CSS symbols() function. Hover over a browser icon to see the version that first introduced support for this CSS function.

This function is supported in some modern browsers, but not all.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.