Skip to main content

Attributes

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, MDN uses MathML Core as a reference specification. However, legacy features that are still implemented by some browsers are also documented. You can find further details for these and other features in MathML 4.

Name Elements accepting attribute Description
accent {{ MathMLElement("mo") }} A <boolean> indicating whether the operator should be treated as an accent when used as an under- or over-script.
accent {{ MathMLElement("mover") }}, {{ MathMLElement("munderover") }} A <boolean> indicating whether the under script should be treated as an accent.
accentunder {{ MathMLElement("munder") }}, {{ MathMLElement("munderover") }} A <boolean> indicating whether the over script should be treated as an accent.
actiontype {{deprecated_inline}} {{ MathMLElement("maction") }} A string value specifying the action happening for this element.
align {{ MathMLElement("mtable") }} Specifies vertical alignment of the table with respect to its environment.
background {{deprecated_inline}} {{ MathMLElement("mstyle") }} Use CSS background-color instead.
close {{deprecated_inline}} {{ MathMLElement("mfenced") }} A string for the closing delimiter.
color {{deprecated_inline}} {{ MathMLElement("mstyle") }} Use CSS color instead.
columnalign {{ MathMLElement("mtable") }}, {{ MathMLElement("mtd") }}, {{ MathMLElement("mtr") }} Specifies the horizontal alignment of table cells.
columnlines {{ MathMLElement("mtable") }} Specifies table column borders.
columnspacing {{ MathMLElement("mtable") }} Specifies the space between table columns.
columnspan {{ MathMLElement("mtd") }} A non-negative integer value that indicates over how many table columns the cell extends.
denomalign {{deprecated_inline}} {{ MathMLElement("mfrac") }} The alignment of the denominator under the fraction.
depth {{ MathMLElement("mpadded") }} A {{cssxref("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 {{ MathMLElement("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 {{ MathMLElement("mo") }} A <boolean> specifying whether the operator is a fence (such as parentheses). There is no visual effect for this attribute.
fontfamily {{deprecated_inline}} {{ MathMLElement("mstyle") }} Use CSS font-family instead.
fontsize {{deprecated_inline}} {{ MathMLElement("mstyle") }} Use CSS font-size instead.
fontstyle {{deprecated_inline}} {{ MathMLElement("mstyle") }} Use CSS font-style instead.
fontweight {{deprecated_inline}} {{ MathMLElement("mstyle") }} Use CSS font-weight instead.
frame {{ MathMLElement("mtable") }} Specifies borders of an entire {{ MathMLElement("mtable") }}. Possible values are: none (default), solid and dashed.
framespacing {{ MathMLElement("mtable") }} Specifies additional space added between the table and frame.
height {{ MathMLElement("mpadded") }}, {{ MathMLElement("mspace") }} A {{cssxref("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 {{ MathMLElement("mfrac") }} A {{cssxref("length-percentage")}} indicating the thickness of the horizontal fraction line.
lspace {{ MathMLElement("mo") }} A {{cssxref("length-percentage")}} indicating amount of space before the operator.
lspace {{ MathMLElement("mpadded") }} A {{cssxref("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_inline}} {{ MathMLElement("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 {{cssxref("length-percentage")}} used as a font-size for the element.
mathvariant All MathML elements The logical class of token elements, which varies in typography.
maxsize {{ MathMLElement("mo") }} A {{cssxref("length-percentage")}} indicating the maximum size of the operator when it is stretchy.
minsize {{ MathMLElement("mo") }} A {{cssxref("length-percentage")}} indicating the minimum size of the operator when it is stretchy.
movablelimits {{ MathMLElement("mo") }} A <boolean> indicating whether attached under- and overscripts move to sub- and superscript positions when math-style is set to compact.
notation {{ MathMLElement("menclose") }} A list of notations, separated by white space, to apply to the child elements.
numalign {{deprecated_inline}} {{ MathMLElement("mfrac") }} The alignment of the numerator over the fraction.
open {{deprecated_inline}} {{ MathMLElement("mfenced") }} A string for the opening delimiter.
rowalign {{ MathMLElement("mtable") }}, {{ MathMLElement("mtd") }}, {{ MathMLElement("mtr") }} Specifies the vertical alignment of table cells.
rowlines {{ MathMLElement("mtable") }} Specifies table row borders.
rowspacing {{ MathMLElement("mtable") }} Specifies the space between table rows.
rowspan {{ MathMLElement("mtd") }} A non-negative integer value that indicates on how many rows does the cell extend.
rspace {{ MathMLElement("mo") }} A {{cssxref("length-percentage")}} indicating the amount of space after the operator.
rquote {{deprecated_inline}} {{ MathMLElement("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_inline}} {{ MathMLElement("mstyle") }} Specifies a minimum font size allowed due to changes in scriptlevel.
scriptsizemultiplier {{deprecated_inline}} {{ MathMLElement("mstyle") }} Specifies the multiplier to be used to adjust font size due to changes in scriptlevel.
selection {{deprecated_inline}} {{ MathMLElement("maction") }} The child element visible, only taken into account for some actiontype values.
separator {{ MathMLElement("mo") }} A <boolean> specifying whether the operator is a separator (such as commas). There is no visual effect for this attribute.
separators {{deprecated_inline}} {{ MathMLElement("mfenced") }} A sequence of zero or more characters to be used for different separators.
stretchy {{ MathMLElement("mo") }} A <boolean> indicating whether the operator stretches to the size of the adjacent element.
subscriptshift {{deprecated_inline}} {{ MathMLElement("msub") }}, {{ MathMLElement("msubsup") }}, {{ MathMLElement("mmultiscripts") }} A {{cssxref("length-percentage")}} indicating the minimum amount to shift the baseline of the subscript down.
superscriptshift {{deprecated_inline}} {{ MathMLElement("msup") }}, {{ MathMLElement("msubsup") }}, {{ MathMLElement("mmultiscripts") }} A {{cssxref("length-percentage")}} indicating the minimum amount to shift the baseline of the superscript up.
symmetric {{ MathMLElement("mo") }} A <boolean> indicating whether a stretchy operator should be vertically symmetric around the imaginary math axis (centered fraction line).
voffset {{ MathMLElement("mpadded") }} A {{cssxref("length-percentage")}} indicating the vertical location of the positioning point of the child content with respect to the positioning point of the element.
width {{ MathMLElement("mpadded") }}, {{ MathMLElement("mspace") }}, {{ MathMLElement("mtable") }} A {{cssxref("length-percentage")}} indicating the desired width.
xmlns {{ MathMLElement("math") }} Specifies the URI for the MathML namespace (
http://www.w3.org/1998/Math/MathML
)