MyInternships.in

HTML5 MathML

HTML5 MathML <menclose> Tag

The <menclose> element draws enclosing notation - a box, circle, overline or strike-through - around the expression it contains. The kind of enclosure is chosen with the notation attribute.


Definition and Usage

Use <menclose> to visually mark part of a formula: box a result, circle a term, strike out a cancelled factor, or draw a long-division sign. One or more space-separated notation values can be combined.

Syntax

menclose with a notation value
Example
<menclose notation="box">
  <mrow>...</mrow>
</menclose>

Common notation Values

ValueEffect
boxDraws a rectangle around the content.
circleDraws an ellipse around the content.
roundedboxDraws a rounded rectangle.
top / bottom / left / rightDraws a line on the named side.
updiagonalstrikeDiagonal strike from bottom-left to top-right.
downdiagonalstrikeDiagonal strike from top-left to bottom-right.
horizontalstrikeHorizontal line through the content.
longdivLong-division enclosure.

Example

Boxing a result
Example
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>MathML menclose</title>
</head>
<body>
  <math display="block">
    <mrow>
      <mi>x</mi><mo>=</mo>
      <menclose notation="box">
        <mrow><mn>7</mn></mrow>
      </menclose>
    </mrow>
  </math>
</body>
</html>
⚠️

<menclose> is not part of the MathML Core baseline. Support varies: Firefox renders many notation values, but some Chromium builds ignore it. Test in your target browsers or provide a CSS fallback.

Key Takeaways

  • <menclose> surrounds an expression with visual notation.
  • The notation attribute picks the enclosure - box, circle, strike and more.
  • Combine multiple values with spaces; support is strongest in Firefox.

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