HTML5 MathML

HTML5 MathML Tags

Presentation MathML provides a set of tags that build up mathematical layout - rows, fractions, roots, scripts and tables. The table below lists the most commonly used elements you will place inside the <math> root.


Common Presentation MathML Tags

TagDescription
<math>The top-level root element that wraps every MathML expression.
<mrow>Groups sub-expressions horizontally so they are treated as a single unit.
<mi>An identifier such as a variable or function name (rendered in italics by default).
<mn>A numeric literal.
<mo>An operator, fence or separator such as +, =, ( or ).
<mfrac>A fraction with a numerator over a denominator.
<msqrt>A square root radical.
<mroot>A radical with an explicit index (nth root).
<msup>A base with a superscript (exponent).
<msub>A base with a subscript.
<msubsup>A base with both a subscript and a superscript.
<mover>A base with an over-script (e.g. a hat or bar).
<munder>A base with an under-script.
<munderover>A base with both under- and over-scripts (e.g. sum limits).
<mfenced>Content wrapped in fences (brackets); deprecated in favour of <mrow> with <mo>.
<mtable>A table or matrix layout.
<mtr>A row inside an <mtable>.
<mtd>A cell inside an <mtr>.
<mtext>Ordinary text within a formula.
<mspace>Blank space of a specified size.
<menclose>Draws a notation (box, circle, strike) enclosing its content.
<mmultiscripts>Attaches multiple pre- and post-scripts to a base (e.g. tensors).
💡

Use <mrow> generously to group parts of an expression. Correct grouping helps the browser stretch fences and space operators properly.

Ready to use your HTML skills?

Find web development internships and fresher jobs across India.

Browse Web Dev Internships