MathMLAnchorElement: target property

The target property of the MathMLAnchorElement interface is a string that indicates where to display the linked resource.

It reflects the target attribute of the <a> element.

Value

A string representing the target. Its value can be:

Examples

Basic usage

Given this HTML:

html
<a id="myAnchor" href="https://example.com" target="_blank"> ... </a>

you can get the target of the anchor like this:

js
const mathAnchor = document.getElementById("myAnchor");
mathAnchor.target; // returns '_blank'

Specifications

Specification
MathML Core
# dom-mathmlanchorelement-target

Browser compatibility

See also

  • The MathML <a> element