O'Reilly logo

Designing SVG Web Graphics by Andrew H. Watt

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

Understanding the <svg> Element and Visual Components

As I have indicated in earlier chapters, you can nest <svg> elements within an outer <svg> element. In some senses, that nesting functionally does the same thing as using an <image> element to import separate SVG files, each nested within its own outer <svg> element.

One use of such nested <svg> elements is as a grouping element. Another is for use as independent visual components. Because the <svg> element that ultimately is nested can be used as the outer <svg> element of a separate component during testing, you can develop all the content of the <svg> element as a separate document fragment.

In a team setting, assuming that the size and other relevant parameters of the (to be) nested ...

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