HTML 28 💻 Mathematical Markup Language
Write mathematical notations in a site
math, mfrac, mn, mi, mo, msqrt
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mi>x</mi>
<mo>=</mo>
<mfrac>
<mrow>
<mo>-</mo>
<mi>b</mi>
<mo>±</mo>
<msqrt>
<msup><mi>b</mi><mn>2</mn></msup>
<mo>-</mo>
<mn>4</mn>
<mi>a</mi>
<mi>c</mi>
</msqrt>
</mrow>
<mrow>
<mn>2</mn>
<mi>a</mi>
</mrow>
</mfrac>
</mrow>
</math>
Mathematical Markup Language is an XML based markup language
It is used to describe mathematical notations
It is designed to integrate mathematical formulas into a web site
It can be directly embedded in HTML5
Modern browser support MathML
MathML can also be interpreted by screen readers.
math → is the root element for MathML
mrow → specifies a horizontal line of elements, it groups the entire equation
mi → math identifier, and is used for variables
mo → math operator, and is used for operators like =, – etc
mfrac → a fraction. It has two child elements, numerator and denominator specified by mrow
msqrt → a square root
msup → a superscript, like exponents which has two children the base and the superscript
mn → math number, numerical literals
other elements → msub, mtable, mtr, mtd