make SVG element a link - HTML CSS SVG

HTML CSS examples for SVG:anchor

Description

make SVG element a link

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
 </head> <!--  ww w .j a v  a2  s.c o  m-->
 <body> 
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="612px" height="792px" viewbox="0 0 612 792" enable-background="new 0 0 612 792" xml:space="preserve"> 
   <a xlink:href="http://google.com"> 
    <rect x="-124.203" y="112.232" fill="#E88324" stroke="#000000" stroke-miterlimit="10" width="175.362" height="226.087" /> </a> 
  </svg>  
 </body>
</html>

Related Tutorials