MyInternships.in

HTML5 MathML

HTML5 MathML frame Attribute

The frame attribute on the <mtable> element draws a border around the entire table. It accepts none, solid or dashed to control the outer frame of a matrix or aligned system.


Definition and Usage

Use frame to outline a MathML table. It affects only the outer border; use rowlines and columnlines to draw interior separators. Values are none (no border, the default), solid or dashed.

Values

ValueEffect
noneNo border (default).
solidA solid border around the table.
dashedA dashed border around the table.

Example

A framed matrix
Example
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>MathML frame attribute</title>
</head>
<body>
  <math display="block">
    <mtable frame="solid">
      <mtr>
        <mtd><mn>1</mn></mtd>
        <mtd><mn>0</mn></mtd>
      </mtr>
      <mtr>
        <mtd><mn>0</mn></mtd>
        <mtd><mn>1</mn></mtd>
      </mtr>
    </mtable>
  </math>
</body>
</html>
⚠️

Table framing attributes have uneven support in MathML Core. For dependable borders, wrap the <math> in an element styled with a CSS border, or style the table with CSS.

Key Takeaways

  • frame draws an outer border around an <mtable>.
  • Values are none, solid and dashed.
  • Support is uneven - CSS borders are a reliable fallback.

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