Simple introduction to MathML mathematical formulas in HTML5 _ html5 tutorial skills-

Source: Internet
Author: User
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

  1. Html
  2. Pythagorean theorem
  3. A 2
  4. +
  5. B 2
  6. =
  7. 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

  1. Html
  2. MathML Examples
  3. X
  4. 2
  5. +
  6. 4
  7. Bytes
  8. X
  9. +
  10. 4
  11. =
  12. 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

  1. Html
  2. MathML Examples
  3. A
  4. =
  5. X
  6. Y
  7. Z
  8. W

This will generate the following results

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.