The MathML <mo>
element represents an operator in a broad sense. Besides operators in strict mathematical meaning, this element also includes "operators" like parentheses, separators like comma and semicolon, or "absolute value" bars.
Attributes
- accent
- If the operator is used as an under- or overscript this attribute specifies whether the operator should be treated as an accent.
Allowed values aretrue
orfalse
. - class, id, style
- Provided for use with stylesheets.
- dir
- The text direction. Possible values are either
ltr
(left to right) orrtl
(right to left). - fence
- There is no visual effect for this attribute, but it specifies whether the operator is a fence (such as parentheses).
Allowed values aretrue
orfalse
. - form
- Specifies the role of the operator in an enclosed expression, which affects spacing and other default properties. For ordinary operators (+, -, etc. ) you usually do not need to specify this attribute explicitly.
Possible values are:prefix
, for opening fences. (It is the default value if the operator is the first argument in a<mrow>
element with more than one argument.)infix
, for separators. (It is the default value if the operator is not included in a<mrow>
element.)postfix
, closing fences. (It is the default value if the operator is the last argument in a<mrow>
element with more than one argument.)
- href
- Used to set a hyperlink to a specified URI.
- largeop
- Specifies whether the operator should be drawn larger than normal when
displaystyle="true"
is set. Allowed values are eithertrue
orfalse
. - lspace
- The amount of space before the operator (see length for values and units). The constant
thickmathspace
(5/18em) is the default value. - mathbackground
- The background color. You can use
#rgb
,#rrggbb
and HTML color names. - mathcolor
- The text color. You can use
#rgb
,#rrggbb
and HTML color names. - mathsize
- The size of the content. See length for possible values.
Deprecated values are:small
,normal
andbig
. These will be removed in the future. - mathvariant
- This attribute specifies the logical class of the operator which varies in typography. That is, although the names suggest the typographic style for the class, semantically, items with the same class are treated "the same" within an expression, which might or might not involve displaying them with the named typography. The following values are allowed:
normal
(Default value) ;bold
;italic
;bold-italic
;
double-struck
;bold-fraktur
;script
;bold-script
;fraktur
;
sans-serif
;bold-sans-serif
;sans-serif-italic
;sans-serif-bold-italic
;monospace
;
initial
;tailed
;looped
;stretched
;
- maxsize
- If
stretchy
istrue
, this attribute specifies the maximum size of the operator. Allowed values are:infinity
- an arbitrary length
- minsize
- If
stretchy
istrue
, this attribute specifies the minimum size of the operator. Allowed values are:infinity
- an arbitrary length
- movablelimits
- Specifies whether attached under- and overscripts move to sub- and superscript positions when
displaystyle
isfalse
.
Allowed values are eithertrue
orfalse.
- rspace
- The amount of space after the operator (see length for values and units). The constant
thickmathspace
(5/18em) is the default value. - separator
- There is no visual effect for this attribute, but it specifies whether the operator is a separator (such as commas).
Allowed values aretrue
orfalse
. - stretchy
- Specifies whether the operator stretches to the size of the adjacent element.
Allowed values aretrue
orfalse
. - symmetric
- If
stretchy
istrue
, this attribute specifies whether the operator should be vertically symmetric around the imaginary math axis (centered fraction line).
The default value istrue
if stretchy is set totrue
and otherwisefalse
. Allowed values aretrue
orfalse
.
Examples
<math> <mrow> <mn>5</mn> <mo>+</mo> <mn>5</mn> </mrow> <mrow> <mo> [ </mo> <!-- default form value: prefix --> <mrow> <mn> 0 </mn> <mo> ; </mo> <!-- default form value: infix --> <mn> 1 </mn> </mrow> <mo> ) </mo> <!-- default form value: postfix --> </mrow> </math>
Specifications
Specification | Status | Comment |
---|---|---|
MathML 3.0 The definition of 'mo' in that specification. |
Recommendation | Current specification |
MathML 2.0 The definition of 'mo' in that specification. |
Recommendation | Initial specification |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
mo | Chrome No support No | Edge No support No | Firefox Full support 1 | IE No support No | Opera No support No | Safari Full support 6 | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 4 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
accent | Chrome No support No | Edge No support No | Firefox Full support 1 | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 4 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
dir | Chrome No support No | Edge No support No | Firefox Full support 12 | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 14 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
form | Chrome No support No | Edge No support No | Firefox No support No | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Firefox Android No support No | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
href | Chrome No support No | Edge No support No | Firefox Full support 7 | IE No support No | Opera No support No | Safari Full support 10 | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 7 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
largeop | Chrome No support No | Edge No support No | Firefox No support No | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Firefox Android No support No | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
lspace | Chrome No support No | Edge No support No | Firefox Full support 1 | IE No support No | Opera No support No | Safari Full support 6 | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 4 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
mathsize | Chrome No support No | Edge No support No | Firefox Full support 1 | IE No support No | Opera No support No | Safari Full support 6 | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 4 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
mathvariant | Chrome No support No | Edge No support No | Firefox Full support 28 | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 28 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
maxsize | Chrome No support No | Edge No support No | Firefox Full support 1 | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 4 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
minsize | Chrome No support No | Edge No support No | Firefox Full support 1 | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 4 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
moveablelimits | Chrome No support No | Edge No support No | Firefox Full support 1 | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 4 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
rspace | Chrome No support No | Edge No support No | Firefox Full support 1 | IE No support No | Opera No support No | Safari Full support 6 | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 4 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
stretchy | Chrome No support No | Edge No support No | Firefox Full support 1 | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 4 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
symmetric | Chrome No support No | Edge No support No | Firefox Full support 1 | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 4 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android No support No |
Legend
- Full support
- Full support
- No support
- No support
Gecko-specific notes
- Starting with Gecko 16.0 (Firefox 16.0 / Thunderbird 16.0 / SeaMonkey 2.13) the default values for
lspace
andrspace
have been corrected to match the MathML3 specification. They now default to the constantthickmathspace
(5/18em). - Some
mathvariant
values are only implemented starting with Gecko 28.0 (Firefox 28.0 / Thunderbird 28.0 / SeaMonkey 2.25) and require appropriate math fonts. - Any linebreaking or indentation attributes are not implemented yet. See bug 534962.