This article describes how to use MathML mathematical formulas in HTML5. The use of math labels often results in unexpected results, for more information, see the HTML Syntax of HTML5. ... Apply the MathML element to the tag.
The following is a valid HTML5 document using MathML:
Copy XML/HTML Code to clipboard
- Html
-
-
-
-
- Pythagorean theorem
-
-
-
-
- A 2
- +
- B 2
- =
- C 2
-
-
-
-
The following results are generated:
The Code is as follows:
A2 + b2 = c2
Easy to learn this concept-use FireFox 3.7 or later for online exercises.
Use MathML characters
Imagine a tag using the character delimiter:
Copy XML/HTML Code to clipboard
- Html
-
-
-
-
- MathML Examples
-
-
-
-
-
-
- X
- 2
-
- +
-
- 4
- Bytes
- X
-
- +
- 4
-
- =
- 0
-
-
-
-
This will generate the following results
The Code is as follows:
X 2 + 4 x + 4 = 0
Easy to learn this concept-use FireFox 3.7 or later for online exercises.
Matrix Expression example
Imagine the following example of struct, which is used to represent a simple 2x2 matrix:
Copy XML/HTML Code to clipboard
- Html
-
-
-
-
- MathML Examples
-
-
-
-
- A
- =
-
-
-
- X
- Y
-
-
- Z
- W
-
-
-
-
-
-
-
This will generate the following results