CSS Counters are used to maintain an 'automatic numbering' system
and could be good for sections and sub-sections / Chapter & Verse.
To implement the CSS Counter system you need to use the following properties:-
So, for example:-
In the <head> section you can have
<style>
body {
counter-reset: section;
}
.incrSection {
counter-reset: subsection;
}
.incrSection::before {
content: "Section " counter(section) ". ";
}
.incrSub::before {
counter-increment: subsection;
content: counter(section) ". " counter(subsection) " ";
}
</style>
This basically means...
So, for example:-
This is a Section
Sub-section, the first line.
With some more text.
Sub-section, the second line.
With some more text.
Sub-section, the third line.
With some more text.
And here I shall use it with an unordered list...
So, for example:-
If I want to reset the Section Number back to ONE I can add a
counter-reset:section; before the element.
Here I decided to create my own <resetSection> tag which does just that - see code
Another example is of nested ordered lists...
It seems to have it's own way of creating the numbers as all I am using is
just one counter (called mySection) and it knows to display 2 or 2.3 or 2.3.1 etc.
(I created a NEW counter - called mySection for this)