docs.rodeo

MDN Web Docs mirror

{{MathMLRef}} 

The <mtable> MathML element allows you to create tables or matrices. Its children are {{ MathMLElement("mtr") }}  elements (representing rows), each of them having {{ MathMLElement("mtd") }}  elements as its children (representing cells). These elements are similar to {{ HTMLElement("table") }} , {{ HTMLElement("tr") }}  and {{ HTMLElement("td") }}  elements of HTML.

Attributes

This element’s attributes include the global MathML attributes. Some browsers may also support the following attributes:

[!NOTE] For the width attribute, some browsers may also accept legacy MathML lengths.

Examples

Alignment with row number

<math display="block">
  <mi>X</mi>
  <mo>=</mo>
  <mtable frame="solid" rowlines="solid" align="axis 3">
    <mtr>
      <mtd><mi>A</mi></mtd>
      <mtd><mi>B</mi></mtd>
    </mtr>
    <mtr>
      <mtd><mi>C</mi></mtd>
      <mtd><mi>D</mi></mtd>
    </mtr>
    <mtr>
      <mtd><mi>E</mi></mtd>
      <mtd><mi>F</mi></mtd>
    </mtr>
  </mtable>
</math>

{{EmbedLiveSample('Alignment with row number')}} 

Technical summary

Implicit ARIA role None

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN