Skip to Main Content
SVG for Web Developers
book

SVG for Web Developers

by Ellen Pearlman, Lorien House
December 2002
Beginner to intermediate content levelBeginner to intermediate
464 pages
8h 34m
English
Pearson
Content preview from SVG for Web Developers

XML and SVG

As we keep saying, SVG is written in XML, so familiarity with XML's syntax is very helpful when you want to create or edit SVG code.

Having already looked at XML code, let's take a look at some simple SVG code. Using the Jasc WebDraw program (a drawing application for SVG, which we discuss further in Chapter 10), we made the following graphic in SVG (see Figure 1-8) and exported it into a raster bitmap file for the purposes of display in this book.

Figure 1-8. triangle.svg drawn in Jasc WebDraw.

The code behind the SVG graphic is:

Example 1-2. triangle.svg
					1.  <?xml version="1.0" standalone="no"?>
2. <!DOCTYPE svg PUBLIC "-//W3C//DTD ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Web Applications with SVG

Building Web Applications with SVG

Jon Frost David Dailey and Domenico Strazzullo
SVG Text Layout

SVG Text Layout

Amelia Bellamy-Royds, Kurt Cagle
Using SVG with CSS3 and HTML5

Using SVG with CSS3 and HTML5

Amelia Bellamy-Royds, Kurt Cagle, Dudley Storey

Publisher Resources

ISBN: 0131004999Purchase book