JSFiddle - React, Tailwind, and code Playground

by Trần Ngọc Minh

HTML

<canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;">

Trình duyệt không hỗ trợ phần tử canvas.

</canvas>

JavaScript

var canvas = document.getElementById("myCanvas");

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

ctx.font = "30px Arial";

ctx.fillText("Hello World",10,50);