MathML attribute reference

This is an alphabetical list of MathML attributes. More details for each attribute are available on relevant MathML element pages and on the global attributes page. The values page also describes some notes on common values used by MathML attributes.

Note: As explained on the main MathML page, documentation is focused on a subset of the language that is relevant for browsers. See the MathML Full specification if you want details about other MathML attributes.

Name Elements accepting attribute Description
accent <mo> A <boolean> indicating whether the operator should be treated as an accent when used as an under- or over-script.
accent <mover>, <munderover> A <boolean> indicating whether the under script should be treated as an accent.
accentunder <munder>, <munderover> A <boolean> indicating whether the over script should be treated as an accent.
actiontype Deprecated <maction> A string value specifying the action happening for this element.
align <mtable> Specifies vertical alignment of the table with respect to its environment.
background Deprecated <mstyle> Use CSS background-color instead.
close Deprecated <mfenced> A string for the closing delimiter.
color Deprecated <mstyle> Use CSS color instead.
columnalign <mtable>, <mtd>, <mtr> Specifies the horizontal alignment of table cells.
columnlines <mtable> Specifies table column borders.
columnspacing <mtable> Specifies the space between table columns.
columnspan <mtd> A non-negative integer value that indicates over how many table columns the cell extends.
denomalign Deprecated <mfrac> The alignment of the denominator under the fraction.
depth <mpadded> A <length-percentage> indicating the desired depth (below the baseline).
dir All MathML elements The text direction. Possible values are either ltr (left to right) or rtl (right to left).
display <math> Specifies the rendering mode. The values block and inline are allowed.
displaystyle All MathML elements

A <boolean> specifying whether to set the math-style to normal (if true) or compact (otherwise).

fence <mo> A <boolean> specifying whether the operator is a fence (such as parentheses). There is no visual effect for this attribute.
fontfamily Deprecated <mstyle> Use CSS font-family instead.
fontsize Deprecated <mstyle> Use CSS font-size instead.
fontstyle Deprecated <mstyle> Use CSS font-style instead.
fontweight Deprecated <mstyle> Use CSS font-weight instead.
frame <mtable> Specifies borders of an entire <mtable>. Possible values are: none (default), solid and dashed.
framespacing <mtable> Specifies additional space added between the table and frame.
height <mpadded>, <mspace> A <length-percentage> indicating the desired height (above the baseline).
href All MathML elements Used to set a hyperlink to a specified URI.
id All MathML elements Sets up a unique identifier associated with the element.
linethickness <mfrac> A <length-percentage> indicating the thickness of the horizontal fraction line.
lspace <mo> A <length-percentage> indicating amount of space before the operator.
lspace <mpadded> A <length-percentage> indicating the horizontal location of the positioning point of the child content with respect to the positioning point of the element.
lquote Deprecated <ms> The opening quote to enclose the content. The default value is &quot;.
mathbackground All MathML elements A background-color for the element.
mathcolor All MathML elements A color for the element.
mathsize All MathML elements A font-size for the element.
mathvariant All MathML elements The logical class of token elements, which varies in typography.
maxsize <mo> A <length-percentage> indicating the maximum size of the operator when it is stretchy.
minsize <mo> A <length-percentage> indicating the minimum size of the operator when it is stretchy.
movablelimits <mo> A <boolean> indicating whether attached under- and overscripts move to sub- and superscript positions when math-style is set to compact.
notation <menclose> A list of notations, separated by white space, to apply to the child elements.
numalign Deprecated <mfrac> The alignment of the numerator over the fraction.
open Deprecated <mfenced> A string for the opening delimiter.
rowalign <mtable>, <mtd>, <mtr> Specifies the vertical alignment of table cells.
rowlines <mtable> Specifies table row borders.
rowspacing <mtable> Specifies the space between table rows.
rowspan <mtd> A non-negative integer value that indicates on how many rows does the cell extend.
rspace <mo> A <length-percentage> indicating the amount of space after the operator.
rquote Deprecated <ms> The closing quote to enclose the content. The default value is &quot;.
scriptlevel All MathML elements Specifies a math-depth for the element. See the scriptlevel page for accepted values and mapping.
scriptminsize Deprecated <mstyle> Specifies a minimum font size allowed due to changes in scriptlevel.
scriptsizemultiplier Deprecated <mstyle> Specifies the multiplier to be used to adjust font size due to changes in scriptlevel.
selection Deprecated <maction> The child element visible, only taken into account for some actiontype values.
separator <mo> A <boolean> specifying whether the operator is a separator (such as commas). There is no visual effect for this attribute.
separators Deprecated <mfenced> A sequence of zero or more characters to be used for different separators.
stretchy <mo> A <boolean> indicating whether the operator stretches to the size of the adjacent element.
symmetric <mo> A <boolean> indicating whether a stretchy operator should be vertically symmetric around the imaginary math axis (centered fraction line).
voffset <mpadded> A <length-percentage> indicating the vertical location of the positioning point of the child content with respect to the positioning point of the element.
width <mpadded>, <mspace>, <mtable> A <length-percentage> indicating the desired width.
xmlns <math> Specifies the URI for the MathML namespace (http://www.w3.org/1998/Math/MathML)