Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
What is the difference between SVG and HTML5 Canvas?
The HTML
The HTML
| SVG |
HTML Canvas |
|---|---|
| SVG has better scalability. So it can be printed with high quality at any resolution |
Canvas has poor scalability. Hence it is not suitable for printing on higher resolution |
| SVG gives better performance with smaller number of objects or larger surface. |
Canvas gives better performance with smaller surface or larger number of objects. |
| SVG can be modified through script and CSS |
Canvas can be modified through script only |
| SVG is vector based and composed of shapes. |
Canvas is raster based and composed of pixel. |
Example
you can try to run the following code to add scalable vector graphics (SVG) to web page −
HTML5 SVG HTML5 SVG Circle
Example
You can try to run the following code to learn how to draw a rectangle with HTML5 Canvas −
HTML5 Canvas Tag
Advertisements
