Robots Atlas>ROBOTS ATLAS
Standard

SVG

2001ActivePublished: 30 November 2026Updated: 30 November 2026Published
Key innovation
Describes an image as a resolution-independent text (XML) document instead of a pixel grid, so 2D graphics scale without quality loss and can be styled (CSS), scripted (DOM/JavaScript) and animated like a web document.
Category
Standard
Abstraction level
Standard
Operation level
ApplicationTooling
Use cases
Icons and logos on websitesCharts and data visualizationsResponsive, resolution-independent graphicsUI animationsTechnical diagramsCode-driven graphics generation, including by LLMsMaps and interactive graphics

How it works

An SVG document is XML that describes a 2D scene in a defined coordinate system (the viewBox attribute). Primitive elements — e.g. <rect>, <circle>, <path>, <text> — define shapes, while presentation attributes or CSS rules give them fill, stroke and other styling. Each element is a node in the DOM, so JavaScript can create, modify and attach events to it, enabling interactivity. Animation can be defined, among other ways, in SMIL embedded in the SVG. A browser or other renderer parses the XML and draws the vectors at the requested size. Because the whole scene is text, it can be generated programmatically or by a language model emitting SVG code.

Problem solved

Raster image formats (JPEG, PNG) store a fixed pixel grid, so they lose sharpness when enlarged and are hard to edit programmatically or localize. SVG solves this by describing graphics as vectors in text-based XML: the image scales to any size without loss of quality and can be searched, indexed, compressed and modified with code. For AI systems this means an image format a model can generate directly as text.

Strengths & limitations

Strengths
✓Scales without loss of quality
✓Small file size for geometric graphics
✓Editable and searchable as text
✓Integrates with CSS, DOM and JavaScript
✓Generatable programmatically and by AI models
✓Open W3C standard
Limitations
✗Inefficient for photos and photorealistic imagery (raster formats are better)
✗Very complex scenes can strain rendering
✗Embedded scripting creates an XSS risk with untrusted files
✗Incomplete and inconsistent SVG 2 support in browsers
✗SMIL animation is deprecated in some engines

Components

Shape and path elementsDefine the geometry of the 2D scene.

Graphic primitives such as <rect>, <circle>, <path>, <text>.

Coordinate system & viewBoxProvides resolution-independent scaling.

The viewBox attribute maps document coordinates onto the render area.

Styling (CSS & presentation attributes)Separates appearance from structure.

Fill, stroke and other styling via CSS or presentation attributes.

Official

SVG DOM & scriptingEnables interactivity and programmatic manipulation.

Each element is a DOM node accessible to JavaScript.

Official

Animation (SMIL)Adds animation without external code.

SMIL embedded in SVG defines element timing and motion.

Official

Implementation

Implementation pitfalls
Inconsistent SVG 2 and SMIL support across browsersMedium

Some SVG 2 features are not fully implemented, and SMIL animation is deprecated in some engines.

Fix:Use a well-supported subset of SVG 1.1 and CSS/JavaScript animation for critical effects.
XSS risk from embedded scriptingHigh

SVG can contain JavaScript, so untrusted SVG files can be an XSS attack vector.

Fix:Sanitize or render untrusted SVG without executing scripts.
Performance with very complex scenesLow

A large number of elements and paths can strain rendering compared with raster.

Fix:Simplify paths and rasterize very complex fragments.

Evolution

Original paper · 2001 · W3C Recommendation
Scalable Vector Graphics (SVG) 1.0 Specification
1999
W3C begins work on SVG

The W3C begins developing an XML-based vector graphics standard.

2001
SVG 1.0 — W3C Recommendation (4 September 2001)
Inflection point

The first official W3C Recommendation defining SVG.

2003
SVG 1.1 and Tiny/Basic profiles — W3C Recommendations (14 January 2003)

Specification modularization and mobile profiles.

2008
SVG Tiny 1.2 — W3C Recommendation (22 December 2008)

Extended mobile profile.

2011
SVG 1.1 — Second Edition (16 August 2011)

Errata with no new features.

2016
SVG 2 reaches Candidate Recommendation (15 September 2016)

The next major version; to date it has not reached full Recommendation status.

Hyperparameters (configurable axes)

Specification profileMedium

SVG variant: Full, Basic or Tiny (mobile profiles).

Full
Tiny
Basic
viewBox / coordinate systemHigh

Defines the coordinate system and visible area that scaling depends on.

0 0 100 100

Hardware requirements

Primary

SVG is a text-based document format (XML) that is hardware-independent; rendering is done in software on CPU or GPU.