JSFiddle - React, Tailwind, and code Playground

HTML

<canvas id="canvas" width="100" height="100"></canvas>

CSS

body { margin: 10px }

JavaScript

var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");

var width = 50;
var height = 50;

ctx.strokeStyle = "#CC0000";
ctx.lineWidth = 3;
ctx.strokeRect(0, 0, 50, 50);

ctx.strokeStyle = "#CC0000";
ctx.lineWidth = 3;
ctx.strokeRect(20, 20, 50, 50);

ctx.strokeStyle = "#CC0000";
ctx.lineWidth = 3;
ctx.strokeRect(40.5, 40.5, 50, 50);