Falcon80 Logo
Writing on canvas
There are two methods that you can use to add text to a canvas element.

fillText( Text string, X coordinate, Y coordinate, Maximum text width (optional));
strokeText(Text string, X coordinate, Y coordinvate, Maximum text width(optional));


Text string is the actual text that you want displayed on the canvas.

(X coordinate, Y coordinate) is the point from where the text will begin.

Maximum text width specifies the maximum width of the text. The text will be squeezed to fit into this width. So if the text is too long for the width, it may end up looking unreadable. However, this parameter is optional. Experiment with it to find out the right look that suits your requirements.
  <script type="application/javascript">
function init() {
var canvas = document.getElementById("canvas");
if (canvas.getContext)
var ctx = canvas.getContext("2d");
ctx.strokeText("Believe", 5,20);
  <title>Drawing Text on canvas</title>
<body onload="init();">
<canvas id="canvas" width="900" height="500"></canvas><br>
Try Code