Introduction to canvas

The HTML <CANVAS> element is a rectangular element provided by HTML5. It can be used to draw graphics on an HTML Page. Canvas is only a container which supports graphics to be drawn on it, but they have to be drawn using external scripts, e.g. JavaScript.

Empty Canvas

Below is an empty canvas.

It is achieved by using the tags

and using the following style

    canvas {
            border: 2px solid blanchedalmond;