JSFiddle - React, Tailwind, and code Playground

by Mr_Vasu

HTML

<div id="output" class="out">
    
</div>

CSS

*{box-sizing:border-box;}
.out{width:200px;height:auto;border:1px #c0c0c0 solid;}
.inner{
  width:200px;
height:10px;
padding:14px;
font-size:11px;
font-family:arial;
border:1px solid red;
}

JavaScript

window.onload=function(){
    var output = document.getElementById('output');
    var i=1;
    var val="";
    while(i<=10)
    {

        if(!document.getElementById('timedrpact'+i))
        {
            var ele = document.createElement("div");
            ele.setAttribute("id","timedrpact"+i);
            ele.setAttribute("class","inner");
            ele.innerHTML="hi "+i;
            output.appendChild(ele);
            
        }
        i++;
        

    }
};