JSFiddle - React, Tailwind, and code Playground
HTML
<canvas id="myCanvas" width="1000" height="600">
</canvas>
CSS
#myCanvas {
background-color:#FFFF00;
border: none;
margin-left:auto;
margin-right:auto;
}
JavaScript
var canvas=document.getElementById("myCanvas");
var ctx=canvas.getContext("2d");
ctx.fillStyle="#FF0000";
ctx.fillRect(0,0,150,75);