JSFiddle - React, Tailwind, and code Playground

HTML

<div class="prevNext">
<a class="prev" href="#">Previous Article</a>
    <a class="next" href="#">Second</a>
    <a class="next" href="#">Third</a>
    <a class="next" href="#">Next Article</a>
</div>
<div class="prevNext">
<a class="prev" href="#">Previous Article</a>
    <a class="next" href="#">Second</a>
    <a class="next" href="#">Third</a>
    <a class="next" href="#">Fourth</a>
    <a class="next" href="#">Fifth</a>
    <a class="next" href="#">Next Article</a>
</div>

CSS

body {
    margin: 8px;
}

.prevNext {
    text-align: justify;
    border: 1px solid #ccc;
}

.prevNext a {
    display: inline-block;
    position: relative;
    top: 1.2em;
}

.prevNext:before{
    content: '';
    display: block;
    width: 100%;
    margin-bottom: -1.2em;
}

.prevNext:after {
    content: '';
    display: inline-block;
    width: 100%;
}