MyInternships.in

HTML5 MathML

HTML5 MathML open Attribute

The open attribute belongs to the <mfenced> element and sets the character used as the opening fence (bracket). It pairs with close to wrap content in a bracket pair.


Definition and Usage

By default <mfenced> opens with a round bracket (. Set open to any single character - [, {, | and so on - to change the opening fence. Since <mfenced> is deprecated, open appears mainly in older documents.

Syntax

Setting the opening fence
Example
<mfenced open="{" close="}">
  <mi>x</mi>
</mfenced>

Example

Curly-brace fences
Example
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>MathML open attribute</title>
</head>
<body>
  <math display="block">
    <mfenced open="{" close="}" separators=",">
      <mn>1</mn>
      <mn>2</mn>
      <mn>3</mn>
    </mfenced>
  </math>
</body>
</html>
⚠️

<mfenced> and its open attribute are deprecated and not in MathML Core. Prefer an explicit <mo>{</mo> opening operator.

Key Takeaways

  • open sets the opening fence character on <mfenced>.
  • It pairs with close to form a bracket pair.
  • Deprecated - use an explicit opening <mo> instead.

Related HTML Topics

Keep learning with these closely related tutorials.

Ready to use your HTML skills?

Find web development internships and fresher jobs across India.

Browse Web Dev Internships