SVG - Scalable Vector Graphics
SVG describes a picture as shapes and text rather than pixels, so it stays sharp at any size. It is XML, which means you can read it and it can carry a lot of metadata.
SVG stands for Scalable Vector Graphics. It is the W3C's open standard for pictures described as instructions rather than pixels: draw a circle here, follow this curve, fill that shape with this colour, set this word in that typeface. Because the picture is a set of directions, it can be drawn at any size without ever going soft or blocky, which is why logos, icons, maps and charts are so often SVG.
How an SVG stores a picture
An SVG file is XML — readable text you can open in any editor. A <path> element carries a compact string of drawing commands, <rect>, <circle> and <polygon> do the obvious things, <text> holds real selectable text, and <g> groups elements so they can be moved or styled together. A viewBox attribute defines the coordinate system, which is what makes the whole drawing scale cleanly.
Because it is text, an SVG compresses extremely well; a gzipped SVG (sometimes given the extension .svgz) is often a fraction of its original size. Being text also means an SVG can be styled with CSS, animated, and scripted — a browser treats it as part of the document rather than as an opaque image.
That last capability has a security dimension worth knowing: an SVG can contain a <script> element. Anywhere SVG is accepted as a user upload it has to be sanitised or served in a way that cannot execute, which is why some sites refuse SVG even though they accept every raster format.
SVG is a poor container for photographs. You can embed a raster image inside one, but then you have a pixel picture wrapped in XML and none of the scaling benefit.
What metadata an SVG carries
SVG has a dedicated <metadata> element, and because the standard does not dictate what goes in it, editors put a great deal there. Most commonly it holds RDF using Dublin Core terms — dc:title, dc:creator, dc:date, dc:description, dc:rights and a licence URI. A <title> and <desc> element can also sit on the root or on any individual shape, where they double as accessibility text for screen readers.
Then there is the editor's own bookkeeping, and it is usually the largest part. Inkscape writes a whole namespace of its own: the document's window geometry, zoom level and cursor position when it was last saved, guide lines, grid settings, layer names and visibility, and a inkscape:version string. Illustrator embeds an XMP packet with its own document identifiers and history. None of it draws anything.
Two practical points follow. Editor data can easily be most of the file, so running an SVG through an optimiser before publishing often halves it. And layer names are text you wrote: <g inkscape:label="client logo v3 REJECTED"> is invisible in the picture and perfectly visible in the file.
When to use SVG
Use SVG for anything drawn rather than photographed: logos, icons, diagrams, charts, illustrations, maps. It is the right choice for the web, where one file serves every screen density, and for print, where it can be scaled to any size.
Use PNG or JPG for photographs and for anything with continuous tone. Export a flat raster copy as well when you need a picture that will open in software too old or too limited for SVG — and strip the editor metadata before publishing, both to shrink the file and because layer names are not always for public consumption.