HTML 5 MathML

HTML5 Use MathML elements are used in documents, and the corresponding tags are <math> … </math>.

MathML is based on the Mathematical Markup Language, which is a markup language based on XML (a subset of the Standard Universal Markup Language) used to write mathematical symbols and formulas on the Internet.

ML: Most browsers support the MathML tag. If your browser does not support this tag, you can use the latest version of Firefox or Safari to view it.

MathML

ML is a simple

MathML example:

Example

<!DOCTYPE html>
<html>
   <head>
      <meta charset="UTF-8">
      <title>Novice Tutorial</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>

The result picture is as follows:

Novice Tutorial a2 + b2 = c2

Some operators have been added to the example:

Example

<!DOCTYPE html>
<html>
   <head>
      <meta charset="UTF-8">
      <title>Novice Tutorial</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> 

The result is as follows:

Novice Tutorial x 2 + 4 x + 4 = 0

The 3.5 example is a 2×2 in. You can check the effect in Firefox 3.5 and above:

Example

<!DOCTYPE html>
<html>
   <head>
      <meta charset="UTF-8">
      <title>Novice Tutorial</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> 

The result is as follows:

Novice Tutorial A = x y z w