JSFiddle - React, Tailwind, and code Playground

HTML

<p>
  <b>
    <a href="#">This is a link</a>
  </b>
</p>

CSS

a {
  color: red;
  text-decoration: none;
}

.visited {
  color: green;
  text-decoration: line-through;
}

JavaScript

$('a').click(function(){
	$(this).addClass('visited');
});