<html>
<body>
<canvas id="myCanvas" width="300" height="200"
style="border:1px solid #d3d3d3;">
Your browser does not support the canvas element.
</canvas>
<script>
var canvas = document.getElementById("myCanvas");
var ctx=canvas.getContext("2d");
ctx.font="30px Comic Sans MS";
ctx.fillStyle = "red";
ctx.textAlign = "center";
ctx.fillText("Hello World", canvas.width/2, canvas.height/2);
</script>
</body>
<!-- Mirrored from www.w3schools.com/graphics/tryit.asp?filename=trycanvas_helloworld by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:38:44 GMT -->
</html>