JSFiddle - React, Tailwind, and code Playground

HTML

<form id="theForm">
    <label>Rows from</label>
    <input name="rLow" />
     <label>Rows through</label>
    <input name="rHigh" />
    <br/><br/>
    
    <label>Columns from</label>
    <input name="cLow" />
    <label>Columns through</label>
    <input name="cHigh" />
    <br/>  <br/>
    <input type="button" name="go" value="Generate table" />
</form>
<br/>
<br/>
<div id="result"></div>

CSS

#theTable {
    color:black;
}
#theTable tbody tr td {
    width: 32px;
    height: 32px;
    text-align: center;
    vertical-align: middle;
    font-weight: bold;
}
#theTable, #theTable tbody tr th, #theTable tbody tr td {
    border:1px solid black;
    border-collapse: collapse;
}
#theTable tbody tr:first-child td{
    background-color: black;
    color: white;
}

#theTable tbody tr td:first-child {
     background-color: blue;
    color: white;  
}
#theTable tbody tr:first-child td:first-child {
    visibility: hidden;
}

label { 
    font-weight:bold;
    display: block;
}

JavaScript

var form = document.getElementById("theForm");
form.go.onclick = function () {
    var row, col;
    var rL = parseInt(form.rLow.value);
    var rH = parseInt(form.rHigh.value);
    var cL = parseInt(form.cLow.value);
    var cH = parseInt(form.cHigh.value);
    if (isNaN(rL) || isNaN(rH) || isNaN(cL) || isNaN(cH)) {
        return;
    }

    var rows = rH - rL + 1;
    var cols = cH - cL + 1;
    if (rows < 3 || rows > 50 || cols < 3 || cols > 20) {
        return;
    }

    var div = document.getElementById("result");
    // if we had a table before, get rid of it
    if (div.firstChild != null) {
        div.removeChild(div.firstChild);
    }

    var tbl = document.createElement("table");
    tbl.id = "theTable";

    row = tbl.insertRow();
    row.insertCell(); // blank top left cell
    for (var c = cL; c <= cH; ++c) {
        col = row.insertCell();
        col.innerHTML = c;
    }

    for (var r = rL; r <= rH; ++r) {
        row = tbl.insertRow();
        col = row.insertCell();
        col.innerHTML = r;
        for (var c = cL; c <= cH; ++c) {
            var col = row.insertCell();
            col.innerHTML = r * c;
        }
    }
    div.appendChild(tbl);
}