HTML5 allows for MathML elements to be used inside <math> tags. Most browsers can display MathML, which is demonstrated with examples of the Pythagorean theorem and a 2x2 matrix rendered using MathML tags within an HTML5 document.
HTML5 - MathML
The HTML syntax of HTML5 allows for MathML elements to be used inside a document using <math>...</math> tags.
Most of the web browsers can display MathML tags.
3.
Following is avalid HTML5 document with MathML-
<!doctype html>
<html>
<head>
<meta charset = "UTF-8">
<title>Pythagorean theorem</title>
</head>
<body>
<math xmlns = "http://www.w3.org/1998/Math/MathML">
<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>
</math>
</body>
</html>
This will produce the following
result –
a2+b2=c2
4.
Matrix Presentation Examples
Considerthe following example which would be used to represent a simple 2x2 matrix –
<!doctype html >
<html>
<head>
<meta charset
< title>MathML Examples</title>
</head>
<math xmlns " http : //www.w3.org/1998/Math/MathML " >
<mrow>
<mi>A</mi>
<mo>=</mo>
<mfenced open = "[" close="]">
<mtable>
<mtr>
<mtd><mi>x</mi></mtd>
</mtr>
<mtr>
<mtd><mi>z</mi></mtd>
<mtd><mi>w</mi></mtd>
</mtr>
</mtable>
</mfenced>
</mrow>
</math>
</html>
This will produce the following result –
A = x y z w
In some browsers result will be: