Path: blob/main/files/en-us/web/css/@counter-style/prefix/index.md
6519 views
------{{CSSRef}}
The prefix descriptor of the {{cssxref('@counter-style')}} rule specifies content that will be prepended to the marker representation. If not specified, the default value will be "" (an empty string).
Syntax
Values
<symbol>: Specifies a
<symbol>that is prepended to the marker representation. It may be a {{cssxref("<string>")}}, {{cssxref("<image>")}}, or {{cssxref("<custom-ident>")}}.
Formal definition
{{cssinfo}}
Formal syntax
{{csssyntax}}
Examples
Adding a prefix to a counter
HTML
CSS
Result
{{ EmbedLiveSample('Adding_a_prefix_to_a_counter') }}
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
{{Cssxref("list-style")}}, {{Cssxref("list-style-image")}}, {{Cssxref("list-style-position")}}
{{cssxref("symbols", "symbols()")}}, the functional notation creating anonymous counter styles