Grokking HTML
0% completed
The <canvas> Element
A <canvas> element with no attributes is a transparent rectangle 300 pixels wide and 150 pixels tall, and it shows nothing at all. Unlike the elements in the previous lessons, a canvas is not filled by markup. It is a blank grid of pixels, and a program written in JavaScript paints on it, one instruction at a time.
JavaScript is a separate programming language that runs inside the browser. This course does not teach it, so this lesson explains every line it uses. The drawing is the name label of the recipe site from the SVG lesson, so you can compare the two approaches.
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%