Please review the HTML and CSS Code provided below:
HTML :
<ol>
<li>Test</li>
<li>
<ol>
<li>Sub-Chapter</li>
<li>Sub-Chapter</li>
</ol>
</li>
<li>Chapter II</li>
<li> Checking Type A
<ol type = "A">
<li>New Sub-Chapter</li>
<li>New Sub-Chapter</li>
</ol>
</li>
</ol>
<ol>
<li>A New List</li>
</ol>
CSS :
ol { counter-reset: item }
li { display: block }
li:before { content: counters(item, "."); counter-increment: item }
Why is it that the numbers A
and B
are not appearing for the New Sub Chapter
, only 4.1 and 4.2?
View my JSFiddle