property
counter-reset — CSS reference
Instantiates a named counter at a given initial integer (zero when omitted). Nested resets can create nested counter scopes. The reset alone does not output text.
Formal Syntax & Structure
css syntaxcss
counter-reset: section 0;Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS reference lab</title><style>#a {counter-reset: section 3} #a p {counter-increment:section} #a p::before {content:counter(section) ". "}</style><body><section id="a"><p>One</p><p>Two</p></section></body></html>