Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE HTML> <html> <head> <title>Title of the document</title> </head> <body> <canvas id="canvasExample" width="400" height="200"></canvas> <script> var canvas = document.getElementById('canvasExample'); var context = canvas.getContext('2d'); context.font = '30pt Calibri'; context.fillStyle = '#1c87c9'; context.fillText('Canvas Example !', 50, 100); </script> </body> </html>