What is the difference between SVG and <Canvas>?


(Lakshmi Prasanna) #1

I hope this table might help you with your question.

SVG Canvas
Vector based (composed of shapes) Raster based (composed of pixel)
Multiple graphical elements, which become the part of the DOM Single HTML element similar to <img> in behavior
Can be Modified through script and CSS Can be Modified through script only
Give better performance with smaller number of objects or larger surface, or both Give better performance with smaller surface or larger number of objects, or both
Better scalability without losing quality Poor scalability on higher resolution