HTML canvas tag

When writing in HTML, the <canvas> tag is a block element used to draw graphics through the use of a scripting language like JavaScript. It is useful when you want to create graphs or perform simple animations on the fly. The following sections contain information about this tag, including an example of its code, as well as related attributes and browser compatibility.

<canvas id="firstCanvas" width="250" height="250">