The SVG stands for Scalable Vector Graphics. HTML SVG is used to describe graphics. It is much easier to use than canvas. It is a W3C recommendation. SVG is mostly used for vector type diagrams like pie charts, 2-Dimensional graphs in an X,Y coordinate system etc. SVG has several methods for drawing paths
, boxes
, circles
, text
, and graphic images
.
SVG refers as shape based but Canvas refers as pixel based. Due to its capabilities to render large applications it is suited for the applications with large rendering areas like google maps whereas Canvas is not so good in rendering capabilities.
SVGs are more flexible to expand the size beyond its natural size whereas Canvas images are not so flexible.
Also, SVG supports working with event handlers but Canvas does not provide support for them. In terms of gaming also, SVG is not suited for gaming applications but on the other hand Canvas are well suited for those applications.
In SVG, images cannot be saved in other formats but Canvas allows us to save the resulting images in .png
and .jpg
format.
<svg> |
Follow Us: