HTML5 MathML
HTML5 can be used in the document MathML elements corresponding tag is <math> /en. </ math>.
MathML is the Mathematical Markup Language, is an XML (a subset of the Standard Generalized Markup Language) -based standard for writing mathematical symbols and formulas markup language on the Internet.
Note: Most browsers support MathML tag, if your browser does not support this tag, you can use the latest version of Firefox or Safari browser.
Examples of MathML
The following is a simple MathML instance:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>本教程(w3write.com)</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>
FIG operating results, as follows:
The following example adds some operators:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>本教程(w3write.com)</title> </head> <body> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mrow> <msup> <mi>x</mi> <mn>2</mn> </msup> <mo>+</mo> <mrow> <mn>4</mn> <mo></mo> <mi>x</mi> </mrow> <mo>+</mo> <mn>4</mn> </mrow> <mo>=</mo> <mn>0</mn> </mrow> </math> </body> </html>
FIG operating results, as follows:
The following example is a 2 × 2 matrix, you can view the effect in Firefox 3.5 and above:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>本教程(w3write.com)</title> </head> <body> <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> <mtd><mi>y</mi></mtd> </mtr> <mtr> <mtd><mi>z</mi></mtd> <mtd><mi>w</mi></mtd> </mtr> </mtable> </mfenced> </mrow> </math> </body> </html>
FIG operating results, as follows: