mdn / mdn/content

Mistake in the example

Open
#45,456 0 comments 0 reactions 1 assignee Claimed by @estelle View on GitHub
Content:CSS goal: accuracy
Dominant language
Markdown
Stars
11k
Forks
23.2k
Avg merge
2d 9h
Merged PRs (30d)
331

Description

### MDN URL

https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Counter_styles/Using_counters

### What specific section or headline is this issue about?

counter doesn't increment

### What information was incorrect, unhelpful, or incomplete?

the increment should be on the H3

```css

h3 {
counter-increment: section -1; /* Decrement the value of section counter by 1 */}
h3::before {
content: "Section " counter(section) ": "; /* Display the word 'Section ', the value of
section counter, and a colon before the content
of each h3 */
}
```

### What did you expect to see?

see code above

### Do you have any supporting links, references, or citations?

_No response_

### Do you have anything more you want to share?

_No response_

### MDN metadata

Page report details

* Folder: `en-us/web/css/guides/counter_styles/using_counters`
* MDN URL: https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Counter_styles/Using_counters
* GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/css/guides/counter_styles/using_counters/index.md
* Last commit: https://github.com/mdn/content/commit/33094d735e90b4dcae5733331b79c51fee997410
* Document last modified: 2025-12-16T15:14:26.000Z

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.