JSFiddle - React, Tailwind, and code Playground

HTML

<h1 id="myHeader" onclick="getValue()" class="contentheader">Click me!</h1>

JavaScript

function getValue()
    {
      var x=document.getElementById("myHeader")
        , link = document.createElement('link')
        , div = document.createElement('div');
      x.innerHTML = '';
      x.appendChild(link);
      x.appendChild(div);
      div.innerHTML = 'abc';
      link.href = 'http://test.com/phoenix/testcentral.css';
      link.rel = 'stylesheet';
      alert(x.innerHTML);
    }