HTML Editor
<!DOCTYPE html> <html lang="en-US"> <body> <canvas id="point" width="250" height="40" style="border:1px solid #8c8c8c;">Your browser does not support the canvas element. </canvas> <script> var canvas = document.getElementById("point"); var ctx = canvas.getContext("2d"); ctx.font = "30px Arial"; ctx.fillStyle = "#339933"; ctx.textAlign = "center"; ctx.textBaseline = 'middle'; ctx.fillText("Hello World", canvas.width/2, canvas.height/2); </script> </body> </html>
OUTPUT
×

Save as Private