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

Detailing Code

Though using basic shape elements can help you and other developers more easily discern the rendering function of an element, such elements can't always provide you with the information you need to understand the visual function of the element.

Using id attributes can certainly assist in this problem. The id attribute not only serves the function as a code identifier, but it also sometimes acts as a nametag for developers. Though naming every element may seem like a tedious task, the alternative (selectively changing each object's style or removing it to see which object was changed) is far more painful.

In the previous example, Listing 20.2, you will note the addition of id attributes on every graphical element. Such nametags ...

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