Html5 Canvas Tag

The canvas tag is used to draw area graphics on the web page.you can draw graphics inside the canvas using JavaScript,after you create a canvas.you control every pixel of canvas because which is rectangular area.

Example Code

<!DOCTYPE HTML>
  <canvas id="Canvas_tag" width="200" height="100" style="border:1px solid #990000">
</canvas>

Out Put :



In the above example code you must give id, width, and height attribute for canvas element and if you need to give to border for canvas element.

Canvas Element Types:

Following list is a canvas element methods some types.





Content