What is the difference Between Canvas And SVG ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the difference Between Canvas And SVG ?

12th Jun 2016, 10:48 AM
Samyak Jain
Samyak Jain - avatar
2 Answers
+ 2
Canvas draws 2D graphics, on the fly with a JavaScript. SVG is XML based which means that every element is available within the SVG DOM. You can attach JavaScript event handlers for an element. In SVG, each drawn shape is remembered as an object.
12th Jun 2016, 10:56 AM
Deepak kaushik
Deepak kaushik - avatar
0
for newbie the simple answer is. canvas is an area in which you can draw. svg is an image that you can make bigger and smaller without lossing equality.
25th Jul 2016, 6:23 AM
Michelle Dekker
Michelle Dekker - avatar