At the point when utilizing canvas, its critical to comprehend the distinction between the canvas component and the canvas setting, as frequently individuals get these confounded. The canvas component is the genuine DOM hub that is installed in the HTML page. The canvas connection is an item with properties and routines that you can use to render design inside the canvas component.
Each one canvas component can just have one connection. In the event that we utilize the getcontext() technique numerous times, it will give back a reference to the same setting article.
The canvas component is just a compartment for representation. You must utilize a script to really draw the design.
Canvas has a few strategies for drawing ways, boxes, rings, content, and including pictures.
Here is the Syntax for CANVAS Element
Below is complete syntax along with example