JSFiddle - React, Tailwind, and code Playground

HTML

<table id="pineapple">
    <tr>
        <td>
            <div class="up"></div>
        </td>
    </tr>
</table>

CSS

.up, .vp {
    width:100px;
    height:100px;
    background-color:red; 
}

table {
    border-spacing:0;
    border-collapse:collapse;
}

body {
    margin:0; padding:0; 
}

JavaScript

var el = document.getElementById("pineapple");
var cs = window.getComputedStyle(el);
var tex = document.createTextNode(cs.height);
el.appendChild(tex);