Learn Create Your Own Split Screen

Next Page

To display text, we use a similar method, but first we set the font and size.
ctx.font="60px Arial";

For "solid" or "filled" text:

ctx.fillText("Hello", 10, 50);

Or for "outlined" or "stroked" text:

ctx.strokeText("Goodbye", 10, 110);

Try making some changes. What happens if the text is wider than the canvas? Does it wrap onto the next line?