<div>Cats</div>
<div>Dogs</div>
<div>Fish</div>
<div>Hamsters</div>
<div>Rabbits</div>
body {
  counter-reset: the-final-countdown 12;
  line-height: 2;
}

div::before {
  counter-increment: the-final-countdown -2;
  content: "~" counter(the-final-countdown) "~";
  background: yellow;
  display: inline-block;
  width: 2rem;
  margin-right: 0.5rem;
  text-align: center;
}
let div = document.querySelector("div");

console.log(
  window.getComputedStyle(div, '::before').getPropertyValue('content')
);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.

Packages

This Pen doesn't use any packages.