Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. MathML
  3. Reference
  4. Global attributes
  5. href

href

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.

Thehrefglobal attribute creates a hyperlink on the MathML element pointing to the specified URL.

Example

The first equation links to the Wikipedia article about themass-energy equivalence. The square root part of the second equation is a link to theSageMath calculation.

Note:You should avoid nesting MathML elements with thehref attributes, just like<a> elements, as is will lead to user confusion and accessibility issues.

html,body {  height: 100%;}body {  display: grid;  place-items: center;  font-size: 1.5rem;}
html
<math  display="block"  href="https://en.wikipedia.org/wiki/Mass-energy_equivalence">  <mrow>    <mi>E</mi>    <mo>=</mo>    <mi>m</mi>    <msup>      <mi>c</mi>      <mn>2</mn>    </msup>  </mrow></math><math display="block">  <mi>c</mi>  <mo>=</mo>  <msqrt href="https://sagecell.sagemath.org/?z=eJwrLiwq0TCOM9I2iTPSBAAeqgPO">    <msup>      <mn>3</mn>      <mn>2</mn>    </msup>    <mo>+</mo>    <msup>      <mn>4</mn>      <mn>2</mn>    </msup>  </msqrt>  <mo>=</mo>  <mn>5</mn></math>

Syntax

html
<math href="https://example.com/">

Values

URL

The URL to which the hyperlink points.

Specifications

Thehref attribute is not defined in any browser-oriented specification but you can find a description inMathML 4.

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp