O'Reilly logo

Sams Teach Yourself SVG in 24 Hours by Micah Laaker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SVG in SVG

SVG's image element can also reference external SVG files. This support is added to allow SVG files to incorporate other SVG files just as they would another graphic. In the same manner that an SVG document can render with a JPEG file inside, so too can it render an SVG document inside an SVG document.

There is no change in syntax for the image element to support SVG inclusion. Rather, the xlink:href value should point to an SVG document instead of a JPEG or PNG file. The x, y, width, and height attributes still accept the same values and operate in the same manner.

So what is the value of placing an SVG file within an SVG file? This question has many possible answers. By allowing developers to link and render outside SVG files, multiple ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required