JSFiddle - React, Tailwind, and code Playground

by techiedelight

HTML

<!doctype html>
<html lang="en">
<body>
  <div id="container"></div>
  <div>
    <button id="generate">Generate Hyperlink</button>
  </div>
</body>
</html>

CSS

button {
    font-size: 14px;
    margin: 8px;
    padding: 3px;
}

JavaScript

$(document).ready(function() {
    $('#generate').click(function() {
        $('#container').append(
            $(document.createElement('a')).prop({
                target: '_blank',
                href: 'https://www.techiedelight.com/',
                innerText: 'Techie Delight'
            })
        ).append(
            $(document.createElement('br'))
        );
    })
});