SVG is an image format for vector graphics. It literally means Scalable Vector Graphics
An SVG image's data is stored as XML instead of pixels, and consists of components that can be scaled to any level without losing source quality.
SVG is a language for describing 2D graphics in XML.
In SVG, each drawn shape is remembered as an object. If attributes of an SVG object are changed, the browser can automatically re-render the shape.
Canvas is rendered pixel by pixel. In canvas, once the graphic is drawn, it is forgotten by the browser. If its position should be changed, the entire scene needs to be redrawn, including any objects that might have been covered by the graphic
Example Code of a triangle:
<svg height="210" width="400"> <path d="M150 0 L75 200 L225 200 Z" /> </svg>
M = moveto
L = lineto
Z = closepath
Capital letters means absolutely positioned, lower cases means relatively positioned.
Source: W3 school