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

Hyperlinks

Hyperlinks in SVG are quite similar to HTML's hyperlinking system. Hyperlinks let users click on an item and move to another page or location in a manner that generally relates to the name (or image) of the clicked item.

Just as in HTML, hyperlinks are created using the a element. Also, the a element surrounds the content that will serve as the clickable object(s). However, instead of using the HTML href attribute, SVG uses the xlink:href attribute. (You briefly encountered this attribute in Hour 11, “Images,” where it was used to reference an image location.) This attribute is actually a carryover from the Xlink technology. XLink can be thought of as the XML hyperlink destination technology. (For more information on XLink, you can ...

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