Hello, world!

HTML 5 Math ML HTML

The HTML5 Mathematical Markup Language or MathML will illustrate how to apply MathML characters and it also includes matrix presentation examples.



HTML5 – MathML

Applying the HTML5 Mathematical Markup Language or MathML allows you to perform mathematical figures and obtaining both its structure and content inside the webpage content.
Some browsers can show MathML tags but we recommend you to use Firefox 3.7 or higher version. Visit MathML 2.0 Specification to verify W3 Specification for MathML.
 

Syntax html5 – mathML:

<math>...</math>

This example is a valid HTML5 MathML document:

HTML code example html5 – mathML:

<h2>Pythagorean theorem</h2>            
<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>

HTML output html5 – mathML:

Pythagorean theorem

a2 + b2 = c2

Applying MathML Characters

This example displays MathML character &InvisibleTimes.
HTML code example mathML characters:
<math xmlns="http://www.w3.org/1998/Math/MathML">                       
     <mrow>
        <mrow>                                                
           <msup>
              <mi>x</mi>
              <mn>2</mn>
          </msup>                                                            
               <mo>+</mo>                                                            
        <mrow>    
              <mn>6</mn>
              <mo>⁢</mo>
              <mi>x</mi>    
           </mrow>                                                            
               <mo>+</mo>
               <mn>6</mn>                                                            
        </mrow>                                                
            <mo>=</mo>
            <mn>0</mn>                                                
     </mrow>                                    
</math>

HTML output mathML characters:

x 2 + 6 ? x + 6 = 0

Matrix Presentation Examples

The following MathML example will show you a simple 2x2 matrix:

HTML code example matrix presentation:

<math xmlns="http://www.w3.org/1998/Math/MathML">                    
     <mrow>
        <mi>X</mi>
        <mo>=</mo>                                    
        <mfenced open="[" close="]">                                    
               <mtable>                                                
                  <mtr>
                    <mtd><mi>b</mi></mtd>
                    <mtd><mi>c</mi></mtd>
                  </mtr>                                                            
                  <mtr>
                    <mtd><mi>d</mi></mtd>
                       <mtd><mi>a</mi></mtd>
                  </mtr>                                                            
               </mtable>
        </mfenced>
     </mrow>
</math>

HTML output matrix presentation:

X = b c d a