Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

MathML Elements


Index page for MathML elements.


The MathML maction element provides a possibility to bind actions to (sub-) expressions.

The action itself is specified by the actiontype attribute, which accepts several values. To specify which child elements are addressed by the action, you can make use of the selection attribute.


The top-level element in MathML is <math>. Every valid MathML instance must be wrapped in <math> tags. In addition you must not nest a second <math> element in another, but you can have an arbitrary number of other child elements in it.


The MathML menclose element renders its content inside an enclosing notation specified by the notation attribute.


The MathML merror element is used to display contents as error messages. In Firefox this error message is rendered similar to the typical XML error message. Note that this error is not thrown when your MathML markup is wrong or not well-formed XML. You will still get an XML parsing error (in case of the XHTML notation of MathML), which has nothing to do with merror.


The MathML mfenced element provides the possibility to add custom opening and closing parentheses (such as brackets) and separators (such as commas or semicolons) to an expression.


The MathML mfrac element is used to display fractions.


The MathML mglyph element is used to display non-standard symbols where existing Unicode characters are not available. It may be used within token elements.


The MathML mi element indicates that the content should be rendered as an identifier such as function names, variables or symbolic constants. You can also have arbitrary text in it to mark up terms.


The MathML mmultiscripts element allows you to create tensor-like objects.


The MathML mn element represents a numeric literal which is normally a sequence of digits with a possible separator (a dot or a comma). However, it is also allowed to have arbitrary text in it which is actually a numeric quantity, for example "eleven".


The MathML mpadded element is used to add extra padding and to set the general adjustment of position and size of enclosed contents.


The MathML mphantom element is rendered invisibly, but dimensions (such as height, width, and baseline position) are still kept.


The MathML mroot element is used to display roots with an explicit index. Two arguments are accepted, which leads to the syntax: <mroot> base index </mroot>.


The MathML mrow element is used to group sub-expressions, which usually contain one or more operators with their respective operands (such as mi and mn). This element renders as a horizontal row containing its arguments.


The MathML ms element represents a string literal meant to be interpreted by programming languages and computer algebra systems.


The MathML mspace element is used to display a blank space, whose size is set by its attributes.


The MathML msqrt element is used to display square roots (no index is displayed). The square root accepts only one argument, which leads to the following syntax: <msqrt> base </msqrt>.


The MathML mstyle element is used change the style of its children. It accepts all attributes of all MathML presentation elements with some exceptions and additional attributes listed below.


The MathML mtext element is used to render arbitrary text with no notational meaning, such as comments or annotations.

To display text with notational meaning, use mi and mo instead.

The root element

Presentation markup

For the presentation of a mathematical formulas.

Enlivening expressions

General Layout Schemata

Token Elements

Tabular Math

Script and Limit Schemata

Elementary Math

Other elements

See also