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. See the Values page for notes on values and units in MathML.

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>, <mover>, <munderover> A Boolean value specifying whether the operator should be treated as an accent.
accentunder <munder>, <munderover> A Boolean value specifying whether the operator should be treated as an accent.
actiontype <maction> A string value specifying the action happening for this element.
align Deprecated <mtable> Specifies different alignments of several elements (see element pages for details).
background Deprecated <mstyle> Use CSS background-color instead.
close <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> Sets or increments the depth. See length.
dir <math>, <mi>, <mo>, <mrow>, <ms>, <mtext> 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

A Boolean value specifying whether more vertical space is used for displayed equations or, if set to false, a more compact layout is used to display formulas.

In MathML 3 this attribute was only valid on <mstyle>, <mtable>, and <math>.

fence <mo> A Boolean value 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> Specifies the desired height. See lengths for possible values.
href All Used to set a hyperlink to a specified URI.
id All Sets up a unique identifier associated with the element.
length <msline>
linethickness <mfrac> The thickness of the horizontal fraction line.
lspace <mo>, <mpadded> The amount of space before the operator (see length for values and units).
lquote <ms> The opening quote character (depends on dir) to enclose the content. The default value is "&quot;".
mathbackground All The background color. You can use #rgb, #rrggbb and HTML color names.
mathcolor All The text color. You can use #rgb, #rrggbb and HTML color names.
mathsize <mi>, <mn>, <mo>, <ms>, <mtext> The size of the content.
mathvariant <mi>, <mn>, <mo>, <ms>, <mtext> The logical class of the identifier, which varies in typography.
maxsize <mo> The maximum size of the operator.
minsize <mo> The minimum size of the operator.
movablelimits <mo> Specifies whether attached under- and overscripts move to sub- and superscript positions.
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 <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> The amount of space after the operator.
rquote <ms> The closing quote mark (depends on dir) to enclose the content. The default value is "&quot;".
scriptlevel <mstyle> Controls mostly the font-size. The higher the scriptlevel, the smaller the font size.
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 <maction> The child element which is addressed by the action.
separator <mo> There is no visual effect for this attribute, but it specifies whether the operator is a separator (such as commas).
separators <mfenced> A sequence of zero or more characters to be used for different separators.
stretchy <mo> Specifies whether the operator stretches to the size of the adjacent element.
symmetric <mo> If stretchy is true, this attribute specifies whether the operator should be vertically symmetric around the imaginary math axis (centered fraction line).
voffset <mpadded> Sets the vertical position of the child content.
width <mpadded>, <mspace>, <mtable> Specifies the desired width. See lengths for possible values.
xmlns <math> Specifies the URI for the MathML namespace (http://www.w3.org/1998/Math/MathML)