HTML5 | MathML Introduction - GeeksforGeeks

19 May, 2020
The MathML comes in the HTML5 the current MathML version is 3 it was introduced in the year of 2015. The MathML stands for Mathematics Markup Language. It is used to represent the mathematical equation or expression in web browsers like other HTML elements. The 1st version of MathML released in the year of 1998 and after that in the 2nd version was released. Basically MathML is a complex mathematical formula or equation visual representation made easy. The MathML is supported in the HTML5, all the MathML tag must be used inside the <math> and </math> tags.
The MathML is used to describing mathematics as a basis for the machine to machine communication, it is intended handling by specialized authoring tools such as equation editors and it is meaningful to other applications also.
MathML is not-capable:
The MathML is not a calculator to calculate or solve complex equation it is just a way to show the equation.
It is not a programming language it is a Mathematics Markup Language.
MathML is capable:
The MathML can be used to represent the Matrix form.
The MathML can be used to represent the Partial Differential Equation.
The MathML can be used to represent the Chemical Reaction Equation.
Below example gives you a brief idea about MathML:Example:
<!DOCTYPE html><html>  <head>    <title>HTML5 MathML</title></head>  <body style="text-align:center;">      <h1 style="color:green">         GeeksforGeeks     </h1>      <h3>HTML5 MathML</h3>      <!--start tag of the whole representation-->    <math>                  <!-- Creating Matrix -->        <mrow>            <mi>A</mi>            <mo>=</mo>              <mfenced open="[" close="]">                  <mtable>                    <mtr>                        <mtd>                            <mi>a</mi>                        </mtd>                        <mtd>                            <mi>b</mi>                        </mtd>                    </mtr>                      <mtr>                        <mtd>                            <mi>x</mi>                        </mtd>                        <mtd>                            <mi>y</mi>                        </mtd>                    </mtr>                  </mtable>              </mfenced>        </mrow>                <!-- Creating equation -->        <br><br>        <msub>            <mi>Geeks</mi>            <mn>4</mn>        </msub>        <mo>+</mo>        <mn>Geeks</mn>        <mo>=</mo>        <msub>            <mi>G</mi>        </msub>        <mo>→</mo>        <msub>            <mi>e</mi>            <mn>2</mn>        </msub>        <mo>→</mo>        <mi>k</mi>        <mi>s</mi>        <mn>4        </mn>        <msub>            <mi>G</mi>        </msub>        <mo>→</mo>        <msub>            <mi>e</mi>            <mn>2</mn>        </msub>        <mo>→</mo>        <mi>k</mi>        <mi>s</mi>    </math></body>  </html>
Output:Note: There are almost 30+ MathML tags available. All the tags aew lised below in table format:
Supported Browsers: The browsers supported by HTML5 MathML tags are listed below:
Firefox
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.
HTML-MathML
HTML5
HTML
Web Technologies
HTML
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Comments
Old Comments
Top 10 Projects For Beginners To Practice HTML and CSS Skills
How to insert spaces/tabs in text using HTML/CSS?
How to update Node.js and NPM to next version ?
How to set the default value for an HTML <select> element ?
How to set input type date in dd-mm-yyyy format using HTML ?
Roadmap to Become a Web Developer in 2022
Installation of Node.js on Linux
Top 10 Projects For Beginners To Practice HTML and CSS Skills
How to fetch data from an API in ReactJS ?
How to insert spaces/tabs in text using HTML/CSS?