You are here: Home > SVG Elements > a element
Introduction
The a element is used to create a hyperlink around SVG elements. The a element uses attributes in the XLink namespace and thus, attributes like href and title must be prefixed with a namespace prefix that maps to "http://www.w3.org/1999/xlink".
HTML has an <a> element which serves a similar purpose.
Details
Usage
<a xlink:href="/" xlink:title="Go Home">
<circle cx="50%" cy="50%" r="20%" fill="green"/>
</a>
<a xlink:href="example.com" target="_blank">
<text x="50" y="50" font-size="20">Example</text>
</a>
Attributes
Common attributes:
- xlink:href
- xlink:title
- target