CSS @counter-style At-Rule

Beginner
3 examples
Updated: Nov 2026

Definition and Usage

The @counter-style at-rule defines a named counter style. Use it with list-style-type to create custom bullets, letters, or symbols.

CSS Syntax

syntax.css
@counter-style thumbs {
  system: cyclic;
  symbols: "👍" "👉";
  suffix: " ";
}
ul { list-style-type: thumbs; }

Key Parts

PartPurposeTry it
systemcyclic, numeric, alphabetic, additive, and moreTry it
symbolsGlyphs or strings used as markersTry it
suffix / prefixText added around each markerTry it

CSS Examples

Emoji bullets

example.css
@counter-style stars {
  system: cyclic;
  symbols: "★" "☆";
  suffix: " ";
}
ul { list-style: stars; }
Try It Yourself

Letter markers

example.css
@counter-style boxed {
  system: alphabetic;
  symbols: A B C D E;
  suffix: ") ";
}
Try It Yourself

Browser Support

@counter-style is a modern CSS at-rule.

✓ Modern CSS

@counter-style

Check current browsers before relying on advanced behavior.

90% Modern browsers
Google Chrome Recent
Full support
Mozilla Firefox Recent
Full support
Apple Safari Recent
Full support
Microsoft Edge Recent
Full support
@counter-style Modern support

Bottom line: Use progressive enhancement. Keep a readable fallback when a browser ignores the at-rule.

Frequently Asked Questions

A reusable named list marker style you can assign with list-style-type.
It works anywhere CSS counters or list-style-type apply.
Markers repeat through the symbols list for every item.
Usually no. Prefer content changes or ::marker colors instead.
Supported in Firefox and Chromium; Safari support is limited—keep a fallback list-style-type.

Next: @view-transition

Continue with @view-transition.

@view-transition tutorial →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

3 people found this page helpful