Use CSS Counters to Create Pure CSS Dynamic Lists

Greg Thoman
InstructorGreg Thoman

Share this video with your friends

Send Tweet

CSS counters let you create dynamic lists without JavaScript. In this lesson, we will create a multi-level table of contents using the CSS counter-reset and counter-increment properties with the counter attribute.

~ 4 years ago

Counters are great :) The only downside is that putting data in the content property is not always accessible, so we only should generate content via CSS that is not essential for the user. Otherwise, some screen readers won't read the CSS generated content.