HTML5 MathML

HTML5 MathML separator Attribute

The separator attribute on <mo> marks an operator as a separator, such as a comma between list items. This affects the spacing the browser applies around it.


Definition and usage

The separator attribute takes true or false. When true, the <mo> is treated as a separator (like a comma or semicolon) and given separator-appropriate spacing rather than binary-operator spacing. Characters like the comma have separator set to true by default in the operator dictionary.

Which elements use it

  • <mo> - marks the operator as a separator token.

Example

A comma separator inside a list
<math>
  <mrow>
    <mo>(</mo>
    <mi>x</mi>
    <mo separator="true">,</mo>
    <mi>y</mi>
    <mo>)</mo>
  </mrow>
</math>

The comma between x and y is marked as a separator, so the browser applies tight leading space and normal trailing space appropriate for a list.

ℹ️

The separator behaviour is part of MathML Core and supported by modern browsers via the operator dictionary.

Ready to use your HTML skills?

Find web development internships and fresher jobs across India.

Browse Web Dev Internships