JSFiddle - React, Tailwind, and code Playground

by Exceeder

HTML

<button onclick="addElement()">Click me</button>
<ul id="myList">
</ul>

JavaScript

function addElement() {
    // Create a <li> node, result is <li></li>
    var node = document.createElement("LI");        
    // Create a text node to fill the LI with test
    var textnode = document.createTextNode("Click at "+new Date());
    // Append the text to <li>
    node.appendChild(textnode);                           
    // Append <li> to <ul> with id="myList"
    document.getElementById("myList").appendChild(node);      
}