This tutorial describes how to use the <canvas>
element to draw 2D graphics, starting with the basics. The examples provided should give you some clear ideas about what you can do with canvas, and will provide code snippets that may get you started in building your own content.
<canvas>
is an HTML element which can be used to draw graphics via scripting (usually JavaScript). This can, for instance, be used to draw graphs, combine photos, or create simple (and not so simple) animations. The images on this page show examples of <canvas>
implementations which will be created in this tutorial.
First introduced in WebKit by Apple for the macOS Dashboard, <canvas>
has since been implemented in browsers. Today, all major browsers support it.