body { counter-reset: mySectionCounter; } h1:before { counter-increment: mySectionCounter; content: 'ARTICLE ' counter(mySectionCounter, upper-roman) ' - '; } h1 { counter-reset: mySubSectionCounter; } h1:after { } h2:before { counter-increment: mySubSectionCounter; content: 'Section ' counter(mySectionCounter, decimal) '.' counter(mySubSectionCounter, decimal) ': '; } h2 { }