Meet the Canvas Element
We'll cover the following...
The first thing we are going to do is add a canvas
element to our page and make some adjustments to make them easier to work with. Before we get to any of that, you need is a blank HTML page that we will be working on. If you don’t have a blank HTML page and need some help creating one, go ahead and create a new document and add the following lines of markup into it:
Press + to interact
<!DOCTYPE html><html><head><title>Simple Example</title></head><body></body></html>
Once you have a blank HTML document setup, it's time for the main event you have been eagerly waiting the past 30-ish seconds for!
Adding the Canvas Element
The canvas element is represented by the appropriately named canvas
HTML tag, and it behaves just like any other HTML element you might have used in the past. To add a canvas
element to your page, simply ...