Timeline List Template

A vertical timeline list for displaying events or milestones in chronological order.

This template creates a visually engaging way to present company history, project roadmaps, or step-by-step processes.

A screenshot of a vertical timeline list with items branching off a central line.

Get Source Code Preview

About this Template

This component uses a semantic ordered list (ol) as its foundation. The timeline effect is created entirely with CSS, using the ::before and ::after pseudo-elements on the list and its items. A central vertical line is drawn behind the list items, and each item has a "dot" that connects it visually to the central line. This is a robust, CSS-only approach that keeps the HTML structure clean and meaningful.

Features

Code Breakdown

The timeline is built on a single ol element with the class .timeline. First, we use the ::before pseudo-element on the list itself to draw the main vertical line down the center of the list's padding area.

Then, we use the ::before pseudo-element on each list item (li) to create the "dot" on the timeline. This dot is absolutely positioned to sit precisely on top of the central vertical line. The text content of each list item is pushed away from this central line using padding.

Code

Here's the full code for the template:

View Output