MDN self-hosted library · e01.org

MathMLAnchorElement: type property

MathML

Open notebook · 2 cells web-api-instance-property upstream source

MathML

The type property of the MathMLAnchorElement interface is a string that indicates the MIME type of the linked resource.

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

Value

A string.

Examples

Basic usage

Given this MathML:

<math>
  <a id="myAnchor" href="https://example.com" type="text/html"> ... </a>
</math>

you can get the type of the anchor like this:

const mathAnchor = document.getElementById("myAnchor");
mathAnchor.type; // returns 'text/html'

Specifications

Browser compatibility

See also

  • The MathML <a> element