Implementation

Knowing that there are several viewers for displaying content in SVG, we now need to learn how to get our SVG content to these viewers. If you have the Adobe SVG Viewer installed, you can open an SVG file directly in the browser to see it in action. However, at the present time, the bulk of any commercial development will require your SVG content to reside within the framework of an HTML page.

To include SVG content just as you would any other image within an HTML page, you will need to use the embed element. Although technically not a W3C-approved method for including SVG content, the embed element offers the only sure method for having your SVG image appear in SVG Viewer–supported browsers. The simplest way to include your SVG ...

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.