JSFiddle - React, Tailwind, and code Playground

HTML

<div id="timer"><div id="time"></div><div> Hi</div></div>

CSS

#timer, #time, #timer div{
    display: inline;
}

JavaScript

window.onload = function(){date()}, setInterval(function(){date()}, 1000);

function date() {
    var now = new Date(),
        now = now.getHours()+':'+now.getMinutes()+':'+now.getSeconds();
    $('#time').html(now);
}