Live example for <math>: Theorem of Pythagoras

« back to documentation

In a right angled triangle: the square of the hypotenuse is equal to the sum of the squares of the other two sides.

Rendering

a 2 + b 2 = c 2

Source code

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>MathML in XHTML</title>
</head>
<body>

    <math xmlns="http://www.w3.org/1998/Math/MathML">
        <mrow>
            <mrow>
                <msup>
                     <mi>a</mi>
                     <mn>2</mn>
                </msup>
                <mo>+</mo> 
                <msup>
                    <mi>b</mi>
                    <mn>2</mn>
                </msup>
            </mrow>
            <mo>=</mo>
            <msup>
                <mi>c</mi>
                <mn>2</mn>
            </msup>
        </mrow>
    </math>

</body>
</html>

« back to documentation