S2
jS
Learn
Create Your Own
Split Screen
Go to Live Site
Next Page
Likewise for stroked text you can manipulate strokeStyle, and also lineWidth.
<HTML> <head> <title> My new Web Page </title> </head> <body> <canvas id=myCanvas width=300 height=300 style="background-color: pink;"> </canvas> <script> var ctx = myCanvas.getContext("2d"); ctx.font= "60px Arial"; ctx.strokeStyle= "Blue"; ctx.strokeText("Goodbye", 10, 110); ctx.lineWidth= 3; ctx.strokeText("Goodbye", 10, 170); </script> </body> </html>