The SVGAElement interface provides access to the properties of an <a> element, as well as methods to manipulate them.

EventTarget Node Element SVGElement SVGGraphicsElement SVGAElement

Instance properties

This interface also inherits properties from its parent, SVGGraphicsElement, and implements properties from HTMLHyperlinkElementUtils.


SVGAElement.href Read only

An SVGAnimatedString that reflects the href or xlink:href Deprecated attribute.


A string that reflects the hreflang attribute, indicating the language of the linked resource.

A string that reflects the ping attribute, containing a space-separated list of URLs to which, when the hyperlink is followed, POST requests with the body PING will be sent by the browser (in the background). Typically used for tracking.


See HTMLAnchorElement.referrerPolicy.


See HTMLAnchorElement.rel.


See HTMLAnchorElement.relList. Read only

It corresponds to the target attribute of the given element.

SVGAElement.text Deprecated

A string that is a synonym for the Node.textContent property.


A string that reflects the type attribute, indicating the MIME type of the linked resource.

Instance methods

This interface has no methods but inherits methods from its parent, SVGGraphicsElement.


In the example below, the target attribute of the <a> element is set to _blank and when the link is clicked, it logs to notify whether the condition is met or not.

const linkRef = document.querySelector("a"); = "_self";

linkRef.onclick = () => {
  if ( === "_blank") {
    console.log("BLANK!"); = "_self";
  } else {
    console.log("SORRY! not _blank");


Scalable Vector Graphics (SVG) 2
# InterfaceSVGAElement

Browser compatibility

BCD tables only load in the browser

See also

  • SVG <a> element