JSFiddle - React, Tailwind, and code Playground

by Amar Nyayapati

HTML

<table id="mainDiv"></table>

<script>
var str = ''; 
for(i = 0;i < 8 ; i++){
    str += '<tr>';
    for(j = 0; j < 8 ;j++){
       str += '<td ></td>';
    }
    str += '</tr>';
}
$("#mainDiv").html(str);
$("tr td:nth-child(4)").css("background-color", "#bbbbff");

</script>

CSS

mainDiv{
    width:416px;
    height:416px;

}
td{
        border:1px solid black;
        width:50px;
        height:50px;    
}