ABSTRACT

There are times, however, when you need to present graphics, too. Typically, HTML has provided support for pixel-based images only in JPG and GIF image format. With HTML5, you can now create mathematically generated images. The new formats are Scalable Vector Graphics, SVG, and CANVAS. The difference between the two is that SVG is an XML-based language that describes how an image should be displayed in 2D constructs. The CANVAS tag also describes 2D images, but it does so using JavaScript. The CANVAS tag also allows you to easily integrate interactivity within it using JavaScript.