Canvas and SVG
From HTML Wiki
Canvas and SVG Elements
The <svg> element is intended the 2D vector rendering. The <canvas> element gives access to the 2D Context API.
Technical comparison
SVG | 2D Context API |
---|---|
document-based | script-based |
vectors | pixel operations |
object model with hi-testing and events | low-level graphics API, no scene graph |
performance hit with large numbers of shapes | fast rendering |
accessible | must create accessible equivalent |
Use case comparison
SVG | 2D Context API |
---|---|
user interfaces | fast-paced games |
scalable images | very complex images |
interactive animations | highly dynamic visualizations |
for designers | for developers |