Hour 8. Symbols

One of the most useful features in SVG is the ability to establish an object (or group of objects) as a symbolic group. By doing so, this “symbol” can be referenced multiple times throughout the document.

For example, say you were creating a bulleted list of ten items that would need to be updated for every season. For lack of a better example, say you wanted a pumpkin for your Halloween bullet. Rather than drawing one pumpkin and duplicating it nine times (creating a lot of additional code), you can create the bullet graphic once and store it within a reference library. Now your pumpkin exists abstractly and can be referenced with a small line of code ten times to create your list. Even better, when you decide to change the pumpkin ...

Get Sams Teach Yourself SVG in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.