You can achieve this by doing the following:
$('a').css("background-color",red);
But you should not do this directly on the hyperlink. You must create a class or Id and add this CSS class for a specific class or id.
HTML: -
<a href="#" class="link" id="link">Test</a>
JQuery: -
$('#link').css("background-color",red);
source share