MathML HTML

Align at Equals Example

This is example demonstrates how to align equations at the equals sign using the mtable element in MathML.

AlignAtEquals.html

<!doctype html>
<html>
  <head>
    <title>XoaX.net's MathML: Align at Equals Example</title>
  </head>
  <body>
    <p>This demonstrates how to align equations at the equals sign, using an <b>mtable</b> element.</p>
    <math display="block">
    	<mtable>
   			<mtr>
   				<mtd><mi>y</mi></mtd>
    			<mtd><mo>=</mo></mtd>
   				<mtd style="text-align: left;"><mi>a</mi><msup><mi>x</mi><mn>2</mn></msup>
   					<mo>+</mo><mi>b</mi><mi>x</mi><mo>+</mo><mi>c</mi></mtd>
   			</mtr>
   			<mtr>
    			<mtd></mtd>
   				<mtd><mo>=</mo></mtd>
   				<mtd><mi>a</mi><mo>(</mo><msup><mi>x</mi><mn>2</mn></msup><mo>+</mo>
   					<mfrac><mi>b</mi><mi>a</mi></mfrac><mi>x</mi><mo>)</mo><mo>+</mo><mi>c</mi></mtd>
   			</mtr>
   		</mtable>
   	</math>
  </body>
</html>
 

Output

 
 

© 2007–2026 XoaX.net LLC. All rights reserved.