How to define MathML Presentation in HTML5

In this article, I will go to explain MathML Presentation in HTML5.
  • 1615

MathML Presentation in HTML5

  • MathML is an XML vocabulary for marking up mathematics.

  • Presentation MathML is part of HTML5

  • MathML Presentation is primarily concerned with describing the layout of a mathematical expression.

Example

Consider the following example which would be used to represent a simple 2x2 matrix

<!doctype html>

  <html>

  <head>

  <meta charset="UTF-8">

  <title>MathML Presentation Examples</title>

  </head>

  <body>

   <h1> Matrix Presentation<h1>

    <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>

 

This would produce following result

 

math presentation.jpg

Further Readings

You may also want to read these related articles :

  • HTML5 Article

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.