MathML
MathML equations can either be referenced from the document as external resources (the file should end with the .mml extension):
<p> The quadratic formula: <img src="quadratic.mml"/></p>
or embedded directly in the document:
<p> The quadratic formula:
<math>
<mi>x</mi>
<mo>=</mo>
<mfrac>
<mrow>
<mo form="prefix">−</mo> <mi>b</mi>
<mo>±</mo>
<msqrt>
<msup> <mi>b</mi> <mn>2</mn> </msup>
<mo>−</mo>
<mn>4</mn> <mo></mo> <mi>a</mi> <mo></mo> <mi>c</mi>
</msqrt>
</mrow>
<mrow>
<mn>2</mn> <mo></mo> <mi>a</mi>
</mrow>
</mfrac>
</math>
</p>
Notes:
- No styling is required to show the embedded MathML in the output. It works automatically for HTML or XML document types.
- For HTML5, the namespace declaration is not required.