HTML5 MathML

HTML5 MathML close Attribute

The close attribute specifies the closing fence character used by the <mfenced> element - for example ) or ]. It pairs with the open attribute.


Definition and usage

The close attribute is applied to <mfenced> to choose the character that closes the fenced group. By default it is a right parenthesis. Common values include ), ], } and |.

Which elements use it

  • <mfenced> - sets the closing bracket of the fence group.

Example

A group closed with a square bracket
<math>
  <mfenced open="[" close="]">
    <mi>x</mi>
    <mi>y</mi>
  </mfenced>
</math>

Here close="]" renders a closing square bracket after the content, giving [x y].

⚠️

Because <mfenced> is deprecated and absent from MathML Core, the close attribute has limited support. Prefer an explicit closing <mo>]</mo> operator inside an <mrow>.

Ready to use your HTML skills?

Find web development internships and fresher jobs across India.

Browse Web Dev Internships