Mrs. Lastri’s numbered poster on the frame: the browser renders your HTML and CSS, counter-reset, counter-increment and counter-set are read off each element…
Tutorial step numbers, chapter headings, nested tables of contents, articles: CSS can number all of them and stay right when items are added, removed or hidden. The confusing part: where a counter is made (counter-reset) decides how far it reaches.
counter-reset makes a counter, counter-increment adds, counter-set replaces, counter() reads
counter-reset placed on li. All 0: the counter-increment is missing (or its name is misspelled), so counter() reads a counter nobody adds to. Put counter-reset once on the parent and counter-increment on each item.::before is usually read as plain text, but that is not "item 2 of 5" information. For an order that matters, keep <ol>. And list-style: none makes Safari with VoiceOver stop announcing the list as a list; add role="list" when that matters.::before content is generated content, not DOM text: it is not in innerText and is not selected. If the numbers must be copyable (article numbers people quote), write them in the HTML.<li> in the middle of the list The numbers after it move on their own. Look at innerText too: the numbers are not in the DOM text.counter-reset: h3 from h2 The sub-heading in the second part goes on to 2.3 instead of 2.1: the reset on h2 is what restarts each part.class="habis" to one <li> in the stock list A display: none item is not counted; the rest stay in sequence.