JSFiddle - React, Tailwind, and code Playground

HTML

<a href="http://fiddle.jshell.net/_display/">test</a><br />
<a href="http://www.google.com">Google</a>

CSS

a:hover {
    color: lime;
}
a:active {
    color: red;
}

JavaScript

$(document).ready(function(){

    $("a").each(function(i,o){

        if ($(o).attr('href') == window.location) {
            $(o).css('background-color', 'red');
        }
    });
                  
});