What is the difference between Canvas and SVG?

 Posted by Mallesh on 9/10/2012 | Category: HTML 5 Interview questions | Views: 2911 | Points: 40

What is the difference between Canvas and SVG?

Canvas and SVG both to be considered as multimedia tags in HTML 5.

<canvas> is a simply a rectangular area built with JavaScript functions. The JavaScript API is used to draw vector graphics into a bitmap of a specific size like a paint program. These are pixel-oriented. That means, we cannot change shapes except by overwriting them with other pixels.

SVG stands for Scalable Vector Graphics. <svg> on other hand is a continer for other tags describes the shapes itself. The SVG is used to draw scalable vector graphics in a document format using XML . The drawing is specified as drawing instructions for each shape and any shape can be changed. These drawings are shape-oriented.

Source: books | Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Hariinakoti on: 9/12/2012 | Points: 10
Thanq for Posting Mallesh

Login to post response

More Interview Questions by Mallesh