• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Hour 13. Interaction > Hyperlinks

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 visit www.w3.org/tr/xlink.) Using XLink's xlink:href attribute, the syntax for a hyperlink in SVG is


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint