MathML marks up mathematics. Browsers implement MathML Core, Baseline in all major browsers since January 2023, so equations need no JavaScript. Elements describe layout: mi, mn and mo for identifiers, numbers and operators, plus msub, mfrac and munderover:
<p style="font: 18px system-ui">Daily revenue over the order lines <i>i</i>:</p>
<math display="block" style="font-size: 24px">
<mi>R</mi><mo>=</mo>
<munderover><mo>∑</mo>
<mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>n</mi></munderover>
<msub><mi>q</mi><mi>i</mi></msub><mo>⋅</mo><msub><mi>p</mi><mi>i</mi></msub>
<mo>⋅</mo>
<mrow><mo>(</mo><mn>1</mn><mo>−</mo>
<mfrac><msub><mi>d</mi><mi>i</mi></msub><mn>100</mn></mfrac><mo>)</mo></mrow>
</math>
Authors rarely type MathML; LaTeX converters (MathJax 30,423 , Temml 351 , pandoc) generate it. In pipelines it sits inside publishing XML such as JATS and must pass through transformations untouched.
MathML
Mathematical Markup Language (MathML) describes mathematical notations. It aims at integrating mathematical formulae into the World Wide Web and other documents. Not all browsers support MathML.The example below marks up a representation of ax2+bx+c.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN"
"http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mi>a</mi>
<mo>⁢</mo>
<msup>
<mi>x</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<mi>b</mi>
<mo>⁢</mo>
<mi>x</mi>
<mo>+</mo>
<mi>c</mi>
</mrow>
</math>