Question: what is the difference between svg and canvas and how they each are used?
Answer: SVG is a language for describing 2D graphics in XML. Canvas draws 2D graphics, on the fly (with a JavaScript). SVG is XML based, which means that every element is available within the SVG DOM. ... In canvas, once the graphic is drawn, it is forgotten by the browser.