Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> #canvas { background: #59b8de; } </style> </head> <body> <canvas id="canvas" width="250" height="100"></canvas> <script> var canvas = document.getElementById("canvas"); var context = canvas.getContext("2d"); context.font = "30px Arial"; context.strokeText("Text", 50, 50); </script> </body> </html>