The headings of this page are numbered by CSS counters, in the order the browser walks the document.
Each paragraph with a reference shows it after its text.
A new chapter starts the sub-section counter again from one.
Another reference, drawn after its paragraph in red.