JSFiddle - React, Tailwind, and code Playground
HTML
<canvas id="c" width="500" height="500"></canvas>
CSS
#c {
border: 1px solid black;
padding: 0;
maring: 0;
}
JavaScript
var ctx = document.getElementById('c').getContext('2d');
ctx.textBaseline = "top";
ctx.fillStyle = '#000';
ctx.fillText('hello world', 30, 0);
ctx.fill();