HTML Tutorials - Herong's Tutorial Examples - v2.30, by Herong Yang
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">−</mo>
<mi>b</mi>
<mo>±</mo>
<msqrt>
<msup>
<mi>b</mi>
<mn>2</mn>
</msup>
<mo>−</mo>
<mn>4</mn>
<mo>⁢</mo>
<mi>a</mi>
<mo>⁢</mo>
<mi>c</mi>
</msqrt>
</mrow>
<mrow>
<mn>2</mn>
<mo>⁢</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:
For more MathML examples, visit "MathML Examples" Website at https://elsenaju.eu/mathml/MathML-Examples.htm.
Table of Contents
Differences between HTML and XHTML
Relation between HTML and JavaScript
Relation between HTML and DHTML
►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