MathMLAnchorElement: type property
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 HTML:
html
<a id="myAnchor" href="https://example.com" type="text/html"> ... </a>
you can get the type of the anchor like this:
js
const mathAnchor = document.getElementById("myAnchor");
mathAnchor.type; // returns 'text/html'
Specifications
| Specification |
|---|
| HTML> # dom-a-type> |
Browser compatibility
See also
- The MathML
<a>element