suffix CSS at-rule descriptor

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2023.

The suffix descriptor of the @counter-style rule specifies content that will be added to the end of the marker representation.

Syntax

css
/* <symbol> value: string, image, or identifier  */
suffix: "";
suffix: ") ";
suffix: url("bullet.png");

Values

The suffix descriptor takes as its value a single <symbol>:

<symbol>

Specifies a <symbol> that is appended to the marker representation. It may be a <string>, <image>, or <custom-ident>.

Formal definition

Related at-rule@counter-style
Initial value". " (full stop followed by a space)
Computed valueas specified

Formal syntax

suffix = 
<symbol>

<symbol> =
<string> |
<image> |
<custom-ident>

<image> =
<url> |
<image()> |
<image-set()> |
<cross-fade()> |
<element()> |
<gradient>

<image()> =
image( <image-tags>? [ <image-src>? , <color>? ]! )

<image-set()> =
image-set( <image-set-option># )

<cross-fade()> =
cross-fade( <cf-image># )

<element()> =
element( <id-selector> )

<image-tags> =
ltr |
rtl

<image-src> =
<url> |
<string>

<image-set-option> =
[ <image> | <string> ] [ <resolution> || type( <string> ) ]?

<cf-image> =
[ <image> | <color> ] &&
<percentage [0,100]>?

<id-selector> =
<hash-token>

Examples

Setting a suffix for a counter

HTML

html
<ul class="choices">
  <li>One</li>
  <li>Two</li>
  <li>Three</li>
  <li>None of the above</li>
</ul>

CSS

css
@counter-style options {
  system: fixed;
  symbols: A B C D;
  suffix: ") ";
}

.choices {
  list-style: options;
}

Result

Specifications

Specification
CSS Counter Styles Level 3
# counter-style-suffix

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
suffix
Chrome – Full support
Chrome 91 (Release date: 2021-05-25)
footnote Full support
Edge – Full support
Edge 91 (Release date: 2021-05-27)
footnote Full support
Firefox – Full support
Firefox 33 (Release date: 2014-10-14)
footnote Full support
Opera – Full support
Opera 77 (Release date: 2021-06-09)
footnote Full support
Safari – Full support
Safari 17 (Release date: 2023-09-18)
footnote Full support
Chrome Android – Full support
Chrome Android 91 (Release date: 2021-05-25)
footnote Full support
Firefox for Android – Full support
Firefox for Android 33 (Release date: 2014-10-14)
footnote Full support
Opera Android – Full support
Opera Android 64 (Release date: 2021-05-25)
footnote Full support
Safari on iOS – Full support
Safari on iOS 17 (Release date: 2023-09-18)
footnote Full support
Samsung Internet – Full support
Samsung Internet 16 (Release date: 2021-11-25)
footnote Full support
WebView Android – Full support
WebView Android 91 (Release date: 2021-05-25)
footnote Full support
WebView on iOS – Full support
WebView on iOS 17 (Release date: 2023-09-18)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

See also