rendered paste body<html><head><title>CSS Autonumber Test</title><style type="text/css">BODY { counter-reset: chapter; /* Create a chapter counter scope */}H1:before { content: "Chapter " counter(chapter) ". "; counter-increment: chapter; /* Add 1 to chapter */}H1 { counter-reset: section; /* Set section to 0 */}H2:before { content: counter(chapter) "." counter(section) " "; counter-increment: section;}H2 { counter-reset: subsection; /* Set subsection to 0 */}H3:before { content: counter(chapter) "." counter(section) "." counter(subsection) " "; counter-increment: subsection;}</style></head><a href="http://www.w3.org/TR/CSS21/generate.html#counters">w3.org CSS 2.1 Counter Docs</a><p><h1>chapter 1</h1> text<h1>chapter 2</h1> text<h2>chap 2 sect 1</h2> text<h1>chap 3</h1> text<h2>chap 3 sect 1</h2> text<h3>chap 3 sect 1 subsection 1</h3> text</body></html>