JSFiddle - React, Tailwind, and code Playground
by Ray Toal
HTML
<h1>Hello</h1>
<canvas id="pic" width="200" height="200">
</canvas>
CSS
h1 {
font: bold 50px Helvetica;
margin: 0;
}
JavaScript
let canvas = document.getElementById("pic");
let ctx = canvas. getContext("2d");
ctx.fillStyle = "rgb(200,0,0)";
ctx.fillRect(10, 10, 75, 70);
ctx.fillStyle = "rgba(0, 50, 250, 0.8)";
ctx.fillRect(60, 30, 100, 60);