<canvas id="myCanvas" width="500" height="300"></canvas>
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");
var x = canvas.width/2;
var y = canvas.height/2;
context.font = "48px arial";
context.textAlign = "center";
//context.fillText('Hello Cavans!!',x,y);
context.strokeStyle = "blue"; // stroke color
context.strokeText('Hello Cavans!!',x,y);
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.