HTML5 MathML
HTML5 MathML separator Attribute
The separator attribute on the <mo> element marks an operator as a separator - typically a comma or semicolon between items in a list. Separators receive different spacing from ordinary operators.
Definition and Usage
Setting separator to true tells the browser that the operator separates items rather than combining them, so it gets tighter, list-appropriate spacing (a small space after, none before). This matters for commas in coordinates, tuples and function arguments.
Syntax
Example
<mo separator="true">,</mo>Example
Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MathML separator attribute</title>
</head>
<body>
<math display="block">
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo separator="true">,</mo>
<mi>y</mi>
<mo separator="true">,</mo>
<mi>z</mi>
<mo>)</mo>
</mrow>
</math>
</body>
</html>💡
Common separators like the comma often behave correctly by default thanks to the operator dictionary, but setting separator="true" makes the intent explicit.
Key Takeaways
- separator marks an operator as a list separator.
- It gives the operator tighter, list-style spacing.
- Use it for commas and semicolons in tuples and arguments.
