I'm trying to do something like this:
<h2>1.1 Bananas</h2>
<h3>1.1.1 </h3>
<h3>1.1.2 </h3>
<h3>1.1.3 </h3>
<h2>1.1 Apples</h2>
<h3>1.1.1 </h3>
<h3>1.1.2 </h3>
<h3>1.1.3 </h3>
<h2>1.1 Oranges</h2>
<h3>1.1.1</h3>
<h3>1.1.2</h3>
<h3>1.1.3</h3>
Notice how the number series repeats.
I can do autonumbering via CSS - but I can't figure out if there's a way to repeat the numbered series.
One way would to be use CSS
countersand reset them every time ah2is encountered like in below snippet.The
counter-resetproperty within theh2selector sets the value of theh2counter to 1 and that of theh3counter to 0 (default) everytime ah2element is encountered.The
counter-incrementproperty within theh3selector increments the value of theh3counter everytime ah3element is encountered.Actually, you don't even need the
h2counter for your case because the value is always 1. So even the below in CSS would suffice: