<mo>
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 are
true
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). displaystyle
-
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. The main effect is that larger versions of operators are displayed, whendisplaystyle
is set totrue
. See alsomovablelimits
on<mo>
. - fence
-
There is no visual effect for this attribute, but it specifies whether the operator is a fence (such as parentheses). Allowed values are
true
orfalse
. - href
-
Used to set a hyperlink to a specified URI.
- 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 are
true
orfalse
. - stretchy
-
Specifies whether the operator stretches to the size of the adjacent element. Allowed values are
true
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 |
---|
MathML Core # operator-fence-separator-or-accent-mo |
Browser compatibility
BCD tables only load in the browser
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.