JSFiddle - React, Tailwind, and code Playground
by Luis Martin
HTML
<canvas id="canvas" widht="300px" height="300px"></canvas>
<p id="info">
</p>
JavaScript
let canvas = document.getElementById("canvas")
canvas.style.backgroundColor = "black"
let width = canvas.width
let height = canvas.height
let info = document.getElementById("info")
info.innerHTML = width + "x" + height
let ctx= canvas.getContext("2d");
ctx.rect(20,20,150,100);
ctx.stroke();