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

Attribute Organization

Similar in importance to the arrangement of your document's different elements is the arrangement of your elements' attributes. In Listing 20.2, you hopefully saw the value of using basic shape elements to ease the understanding of an element's function. Providing an ordering for your attributes produces similar results.

Consider the following two examples:

Listing 20.7. Elements with Various Locations for Their Attributes Result in a Confusing Read
<rect id=”Box1” x=”10” y=”10”
    width=”125” height=”125”/>
<rect x=”53” height=”25” y=”98”
    width=”11” id=”Box2”/>
Listing 20.8. By Using Consistent Locations for Attributes, Understanding an Element's Location Is Possible Much More Quickly
 <rect id=”Box1” x=”10” y=”10” width=”125” ...

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