<mo>

Baseline 2023 *
Newly available

Since January 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

* Some parts of this feature may have varying levels of support.

The <mo> MathML 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

In addition to the global MathML attributes, this element accepts the following attributes whose default values depend on the operator's form and content:

accent Non-standard

A <boolean> indicating whether the operator should be treated as an accent when used as an under- or overscript (i.e. drawn bigger and closer to the base expression).

fence

A <boolean> indicating whether the operator is a fence (such as parentheses). There is no visual effect for this attribute.

form

An enumerated attribute specifying how the operator is to be presented. For example, depending on the value, a different amount of space might be rendered on either side of the operator. It can have one of the following values:

  • prefix: The operator appears before its operands. For example, in the expression + a, the + is a prefix operator.
  • infix: The operator appears between its operands. In the expression a + b, the + is an infix operator.
  • postfix: The operator appears after its operands. For example, in the expression a +, the + is a postfix operator.
largeop

A <boolean> indicating whether the operator should be drawn bigger when math-style is set to normal.

lspace

A <length-percentage> indicating the amount of space before the operator.

maxsize

A <length-percentage> indicating the maximum size of the operator when it is stretchy.

minsize

A <length-percentage> indicating the minimum size of the operator when it is stretchy.

movablelimits

A <boolean> indicating whether attached under- and overscripts move to sub- and superscript positions when math-style is set to compact.

rspace

A <length-percentage> indicating the amount of space after the operator.

separator

A <boolean> indicating whether the operator is a separator (such as commas). There is no visual effect for this attribute.

stretchy

A <boolean> indicating whether the operator stretches to the size of the adjacent element.

symmetric

A <boolean> indicating whether a stretchy operator should be vertically symmetric around the imaginary math axis (centered fraction line).

Note: For the lspace, maxsize, minsize and rspace attributes, some browsers may also accept legacy MathML lengths.

Examples

html
<math display="block">
  <mrow>
    <mn>5</mn>
    <mo>+</mo>
    <mn>5</mn>
  </mrow>
</math>

<math display="block">
  <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>

Technical summary

Specifications

Specification
MathML Core
# operator-fence-separator-or-accent-mo

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
mo
accent
Non-standard
form
largeop
lspace
maxsize
minsize
movablelimits
Named spaces (e.g. thinmathspace to mean 3/18em) for lspace, maxsize, minsize and rspace attributes
DeprecatedNon-standard
Nonzero unitless values (e.g. 5 to mean 500%) for lspace, maxsize, minsize and rspace attributes
DeprecatedNon-standard
rspace
stretchy
symmetric

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Non-standard. Check cross-browser support before using.
Deprecated. Not for use in new websites.