Canvas is a element of HTML5 which uses JavaScript to draw graphics on a web page. A canvas is a rectangular area. Each and every pixel of it can be controlled by us. There are several methods for drawing paths, boxes, circles, characters, and adding images by using canvas.
To add canvas tag to our HTML document we need id, width and height. Below is the example how to write a basic canvas tag to your HTML document.
<canvas id="myFirstCanvas" width="100" height="100"> </canvas>