HTML5 MathML
HTML5 MathML close Attribute
The close attribute belongs to the <mfenced> element and sets the character used as the closing fence (bracket). It works together with the open attribute to wrap content in a bracket pair.
Definition and Usage
By default <mfenced> closes with a round bracket ). Set close to any single character - such as ], } or | - to change the closing fence. Because <mfenced> is deprecated, close is mainly encountered in older documents.
Syntax
Example
<mfenced open="[" close="]">
<mi>x</mi>
</mfenced>Example
Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MathML close attribute</title>
</head>
<body>
<math display="block">
<mfenced open="[" close="]" separators=",">
<mi>a</mi>
<mi>b</mi>
</mfenced>
</math>
</body>
</html>⚠️
<mfenced> and its close attribute are deprecated and not in MathML Core. Prefer an explicit <mo>]</mo> closing operator for reliable rendering.
Key Takeaways
- close sets the closing fence character on <mfenced>.
- It pairs with open to form a bracket pair.
- Deprecated - use an explicit closing <mo> instead.
