Use MathML Elements in EMBED Tags

Q

How to Use MathML Elements in HTML <embed> Tags?

✍: FYIcenter.com

A

If you want to use MathML elements in HTML <embed> Tags, you can save MathML elements in .mml files and include MathML file names in the "src" attribute of <embed> Tags. You also need to specify the type="application/mathml+xml" attribute in <embed> Tags.

You can follow this tutorial to test this.

1. Save the following MathML code in a file called, Einstein-Equation.mml:

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mrow>
    <mi>E</mi><mo>=</mo><mi>m</mi><mo>⁢</mo>
    <msup><mi>c</mi><mn>2</mn></msup>
  </mrow>
</math>

2. Save the following HTML document in another file called, embed.html:

<html><body>
<p>Einstein famous equation: 
<embed style="border: dashed; padding: 10px; width: 1.5in; height: 1.0in;"
  src="/Einstein-Equation.mml" type="application/mathml+xml">
</embed>
</p>
</body></html>

When you open the above HTML file, embed.html, in a Web browser, you may see different behaviors depending on which browser you are using. For example:

  • Firefox v115 blocks the MathML file giving the NS_BINDING_ABORTED error.
  • Safari v12 fails to load MathML file giving the "Unsupported Plug-in" error.
  • Chrome v103 fails to load MathML file giving no errors.
  • Brave v1.41 fails to load MathML file giving no errors.

Einstein famous equation:  

One way to avoid the loading issue is to rename the MathML file as Einstein-Equation.html and load it as an HTML document as shown in the previous tutorial.

Also note that, EMBED tag is deprecated now. You should use OBJECT tag instead.

 

Use MathML Elements in IFRAME Tags

Use MathML Elements in OBJECT Tags

Introduction to MathML (Mathematical Markup Language)

⇑⇑ MathML (Mathematical Markup Language)

2026-04-13, ∼1133🔥, 0💬