JSFiddle - React, Tailwind, and code Playground

HTML

<a rel="hi">hi</a><a rel="bye">bye</a>
<div id="exclude"><a rel="excluded">excluded</a></div>

JavaScript

$(document).ready(function(){
    $("a[rel]:not(div#exclude a[rel])").css("font-weight", "bold"); 
});