JSFiddle - React, Tailwind, and code Playground

HTML

<a>Link 1</a>
<a>Link 2</a>
<a>Link 3</a>
<a>Link 4</a>

CSS

body {
    padding: 10px;
}
a {
    float: left;
    clear: both;    
}
a:before {
    content: attr(data-label);
    color: red;
    text-align: left;
    padding-right: 10px;
    font-size: 11px;
    display: inline;
}

JavaScript

var labels = [
    "1",
    "2",
    "1",
    "3"
    // and so on...    
];

// OR maybe put in some algo for this sequence

$('a').each(function(i) {
    $(this).attr('data-label', labels[i] + '. ');
});