JSFiddle - React, Tailwind, and code Playground

HTML

<div class="block">Some text</div>

JavaScript

var link = "http:/javascript.ru";
$('.block').before('<div class="url" onclick="window.open(\''+link+'\');">Название ссылки</div>');