Relation between HTML and MathML

This section describes how HTML is related to MathML, which an XML-based mathematical notation language that can be embedded in HTML document to present math formulas.

MathML (Math Markup Language) is an XML-based mathematical notation language that can be embedded in HTML document to present math formulas.

Here is a good example of an HTML document with embedded MathML formulas:

<!DOCTYPE html>
<!-- MathML_Example.html
 - Copyright (c) 2019 HerongYang.com. All Rights Reserved.
-->
<html>
<head>
<title>MathML Example</title>
</head>
<body>
<p>The Quadratic Formula created by a MathML code:
</p>
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>x</mi>
    <mo>=</mo>
    <mfrac>
      <mrow>
        <mo form="prefix">&minus;</mo>
        <mi>b</mi>
        <mo>&PlusMinus;</mo>
        <msqrt>
          <msup>
            <mi>b</mi>
            <mn>2</mn>
          </msup>
          <mo>&minus;</mo>
          <mn>4</mn>
          <mo>&InvisibleTimes;</mo>
          <mi>a</mi>
          <mo>&InvisibleTimes;</mo>
          <mi>c</mi>
        </msqrt>
      </mrow>
      <mrow>
        <mn>2</mn>
        <mo>&InvisibleTimes;</mo>
        <mi>a</mi>
      </mrow>
    </mfrac>
  </mrow>
</math>
</body>
</html>

When the above HTML document is displayed in a browser, you will see a nice looking math formula created by the MathML code. See the picture below:

HTML with MathML Example
HTML with MathML Example

For more MathML examples, visit "MathML Examples" Website at https://elsenaju.eu/mathml/MathML-Examples.htm.

Table of Contents

 About This Book

Introduction of HTML

 What Is HTML

 History of HTML

 Differences between HTML and XHTML

 Relation between HTML and CSS

 Relation between HTML and JavaScript

 Relation between HTML and DOM

 Relation between HTML and DHTML

 Relation between HTML and SVG

Relation between HTML and MathML

 Introduction of HTML5 Features

 HTML Document Structure and Content

 HTML Document and Elements Syntax

 Displayed and Printed HTML Documents

 Responsive Design of Web Pages

 MathML Integration in HTML Documents

 References

 Full Version in PDF/EPUB