MyInternships.in

HTML5 MathML

HTML5 MathML <mlabeledtr> Tag

The <mlabeledtr> element is a labelled table row inside an <mtable>. Its first child is the label (for example an equation number) and the remaining children are the ordinary cells of the row.


Definition and Usage

Use <mlabeledtr> in place of <mtr> when a row needs a label - most often to number a displayed equation. The label is placed to one side of the table; the side is controlled by the side attribute on the parent <mtable>.

Syntax

Label first, then cells
Example
<mlabeledtr>
  <mtd><mtext>(1)</mtext></mtd>  <!-- label -->
  <mtd>...</mtd>                 <!-- cell -->
</mlabeledtr>

Example

This numbers a single equation using a labelled row inside a table.

A numbered equation
Example
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>MathML mlabeledtr</title>
</head>
<body>
  <math display="block">
    <mtable>
      <mlabeledtr>
        <mtd><mtext>(1)</mtext></mtd>
        <mtd>
          <mrow>
            <msup><mi>a</mi><mn>2</mn></msup>
            <mo>+</mo>
            <msup><mi>b</mi><mn>2</mn></msup>
            <mo>=</mo>
            <msup><mi>c</mi><mn>2</mn></msup>
          </mrow>
        </mtd>
      </mlabeledtr>
    </mtable>
  </math>
</body>
</html>
⚠️

<mlabeledtr> is not part of the MathML Core baseline and support is limited. For reliable equation numbering, consider a two-column layout or CSS around the <math> element.

Key Takeaways

  • <mlabeledtr> is a table row whose first child is a label.
  • It is used mainly to number displayed equations.
  • Support is limited - test carefully or use a CSS-based alternative.

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