JSFiddle - React, Tailwind, and code Playground
HTML
<a href="">1</a>
<a href="">a</a>
<a href="">2</a>
CSS
.sua-classe {
background:red;
}
JavaScript
$('a').each(function () {
var t = $(this);
if (!isNaN(t.html())) {
t.addClass('sua-classe');
}
});