VjRagavan VjRagavan - 1 year ago 104
CSS Question

What is canvas in HTML 5?

What is canvas in HTML 5? im little new developer.
Canvas is an HTML area on which you can draw graphics.

""500"" id=""mycanvas"" solid="" style=""border:1px" width=""600"">

var c=document.getElementById("mycanvas");
var ctx=c.getContext("2d");

what does it mean? thank you in advance

Answer Source

from MDN docs :

Added in HTML5, the HTML <canvas> element can be used to draw graphics via scripting in JavaScript. For example, it can be used to draw graphs, make photo compositions, create animations, or even do real-time video processing or rendering.

start here : tutorial by MDN

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download