JSFiddle - React, Tailwind, and code Playground
HTML
<span data-link="www.google.com.pk" class="q">text here</span>
CSS
.q {
cursor: pointer;
}
JavaScript
$(".q").click(function() {
window.location.href=$(this).attr('data-link');
});