files/en-us/web/mathml/reference/element/mfenced/index.md
{{Deprecated_Header}}{{Non-standard_Header}}
The <mfenced> MathML element provides the possibility to add custom opening and closing brackets (such as parentheses) and separators (such as commas or semicolons) to an expression.
[!NOTE] Historically, the
<mfenced>element was defined as a shorthand for writing fenced expressions and equivalent to an expanded form involving {{MathMLElement("mrow")}} and {{MathMLElement("mo")}} elements. Nowadays, it is recommended to use that equivalent form instead.
This element's attributes include the global MathML attributes.
close
")" and any white space is trimmed.open
"(" and any white space is trimmed.separators
,)html,
body {
height: 100%;
}
body {
display: grid;
place-items: center;
font-size: 2rem;
}
<math display="block">
<mfenced open="{" close="}" separators=";;,">
<mi>a</mi>
<mi>b</mi>
<mi>c</mi>
<mi>d</mi>
<mi>e</mi>
</mfenced>
</math>
Sample rendering:
Rendering in your browser:
{{ EmbedLiveSample('mfenced_example1', 700, 200, "", "") }}
,)html,
body {
height: 100%;
}
body {
display: grid;
place-items: center;
font-size: 2rem;
}
<math display="block">
<mfenced open="[" close="]" separators="||||,">
<mi>a</mi>
<mi>b</mi>
<mi>c</mi>
<mi>d</mi>
<mi>e</mi>
</mfenced>
</math>
Sample rendering:
Rendering in your browser:
{{ EmbedLiveSample('mfenced_example1', 700, 200, "", "") }}
The <mfenced> element is not defined in any browser-oriented specification but you can find a description in MathML 4.
{{Compat}}