Step-by-Step List Template

A stylish and semantic template for guiding users through a process or tutorial.

This design is perfect for recipes, how-to guides, assembly instructions, or any content that requires a numbered sequence.

Screenshot of a vertical step-by-step list with styled numbers and connecting lines.

Get Source Code Preview

About this Template

This template transforms a standard HTML ordered list into an elegant visual timeline. It uses a modern CSS technique known as CSS Counters to create custom-styled numbers that sit outside the flow of text. A vertical line connects the steps to create a clear path for the user to follow. The code is self-contained and fully responsive.

Features

Code Breakdown

The core of this template is the use of CSS Counters. On the parent ol element we use counter-reset to initialize a new counter. Then for each li element the counter-increment property increases its value.

The numbering effect happens on the ::before pseudo-element on each list item (targeted with the .steps-list-item::before selector). The content property is used to display the current value of our counter. This allows us to style the number independently from the list item's text content. The vertical line that connects the steps is created using the ::before pseudo-element on the ol element (targeted with the .steps-list::before selector). This positions it absolutely behind the list items.

Code

Here's the full code for the template:

View Output