SVG Document Structure

Well-Formed SVG

Imagine staring at your screen the way Michelangelo stared at the ceiling of the Sistine Chapel, Picasso at his canvas, or a tattoo artist at the skin of someone's back, ready to create great art with a touch of a brush or needle or a flourish of code. As any artist knows, before you apply the brush, you have to prepare the canvas, whether it's made of plaster or Pentium processors. In the case of SVG, that means you need to set up the proper document structure.

In Chapter 1, we looked at both an XML and an SVG document, so you've seen a bit of SVG code and its structure and syntax. To review:

Because SVG is based on XML, it follows XML structure and syntax rules. In particular, an SVG document must be ...

Get SVG for Web Developers 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.