Difference between Canvas and SVG in HTML5
In this article I have described the difference between SVG and Canvas in HTML5.
The main aim of canvas and SVG is to create graphics (image/video) inside the browser using coordinate points, but fundamentally they are different.
Each technology has its own important we can not say that one can abandon Canvas in favor of SVG, or vice-versa.
- Its default size is 300 pixel wide and 150 pixel high.
- SVG stands for Scalable Vector Graphics.
- It is used to define vector based graphics.
- SVG is an XML-based vector graphics format.
- SVG is very flexible content can be static, dynamic, interactive and animated .
Difference between Canvas and SVG
||Based on raster image
||Based on vector image containing shapes and paths.
||Rendering capacities is low for large area
||Rendering capacities is high for large area
||Totally depends on Resolution
||Doesn't depend on resolution
||There's no API for animation
||It is capable for API animation
||Low interactive animated user interfaces
||Highly interactive animated user interfaces
||SVG is XML based
||Canvas is rendered pixel by pixel
||Suitable for gaming application
||Not suitable for gaming application
You may also want to read these related articles :
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here