What is SVG?

Scalable Vector Graphics (SVG) is a XML based language for describing 2D (two dimension) graphics, both static and dynamic.

SVG is an open standard developed by W3C (World Wide Web Consortium). Since the SVG images are defined in XML, they can be searched, indexed, compressed. SVG images can be edited using any text editors.

All major web browsers except Internet Explorer supports and renders the SVG images. Internet Explorer needs a plugin for rendering SVG images.

SVG allows 3 types of graphics:

1. Vector Graphics

2. Raster Graphics

3. Text

A typical SVG image’s xml look like

<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
         "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink">
  <polygon fill="red" stroke-width="10" fill-opacity="0.4"
           points="350, 75 379,161 469,161 397,215
                   423,301 350,250 277,301 303,215
                   231,161 321,161"
           transform="translate(-350,-200) scale(2) rotate(10)" />
</svg>

and its Image output

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>