Avoiding Problems by Using Good Coding Practice

I suggest that you change, particularly during your early attempts at hand coding, only one thing at a time, whether that is adding an element, altering an attribute, or adding or refining some animation.

Let me repeat that: Change only one thing at a time when you are learning SVG coding. It helps your sanity!

If you change more than one thing at a time and you move from having an SVG image that is displayed correctly to one that isn’t displayed as you want or, worse, isn’t displayed at all, diagnosing and fixing can be quite a tussle. In the interest of sparing yourself avoidable frustration, change one thing at a time and view the result in an SVG viewer after each step.

This is good advice ...

Get Designing SVG Web Graphics 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.