HTML5 has brought some exciting new advantages to the HTML coding world. Canvas allows you to render graphics powered by Javascript. So throw away that flash code and dive into Canvas. Here you will find the best tutorials and resources to learn Canvas and other HTML5 aspects.
Fitness App Development EssentialsTo create text with HTML5 Canvas, we can use the fillText() method. Text is defined with a string value and a position.context.fillText("Hello World!", x, y);
HTML5 Canvas Text Example
Open in new window<!DOCTYPE HTML> <html> <head> <script> function init() { var canvas=document.getElementById("myCanvas"); var context=canvas.getContext("2d"); var x = 250; var y = 200; context.fillText("Hello World!", x, y); } <body onload="init()"> <canvas id="myCanvas" width="578" height="200">