HTML5 allows for MathML elements

The HTML syntax of HTML5 allows for MathML elements to be used inside a document using <math>...</math> tags.

Most of the web browsers can display MathML tags. If your browser does not support MathML, then I would suggest you to use latest version of Firefox.

You can check W3 Specification for MathML at MathML 2.0 Specification.

MathML Examples:

Following is a valid HTML5 document with MathML:

<!doctype html><html><head><meta charset="UTF-8"><title>Pythagorean theorem</title></head><body> <math xmlns=""><mrow> <msup><mi>a</mi><mn>2</mn></msup> <mo>+</mo> <msup><mi>b</mi><mn>2</mn></msup> <mo>=</mo> <msup><mi>c</mi><mn>2</mn></msup></mrow> </math></body> </html>  

This would produce following result:

a2 + b2 = c2 

Using MathML Characters:

Consider, following is the markup which makes use of the characters &InvisibleTimes;:

<!doctype html><html><head><meta charset="UTF-8"><title>MathML Examples</title></head><body> <math xmlns=""> <mrow>  <mrow> <msup> <mi>x</mi> <mn>2</mn> </msup> <mo>+</mo> <mrow> <mn>4</mn> <mo>⁢</mo> <mi>x</mi> </mrow> <mo>+</mo> <mn>4</mn>  </mrow> <mo>=</mo> <mn>0</mn> </mrow> </math> </body> </html>  
 x2 + 4x + 4 = 0

Matrix Presentation Examples:

Consider the following example which would be used to represent a simple 2x2 matrix:

<!doctype html><html><head><meta charset="UTF-8"><title>MathML Examples</title></head><body> <math xmlns=""> <mrow>  <mi>A</mi>  <mo>=</mo>  <mfenced open="[" close="]"> <mtable> <mtr>  <mtd><mi>x</mi></mtd>  <mtd><mi>y</mi></mtd> </mtr> <mtr>  <mtd><mi>z</mi></mtd>  <mtd><mi>w</mi></mtd> </mtr> </mtable> </mfenced></mrow> </math> </body> </html>  

** Bebas disunting dengan menyebutkan sumber **

Halaman Terkait

  • HTML5 - Color Names
    The following table shows 16 color names that were introduced in HTML 3.2 to support 16 colors that 8-bit graphics cards offered:
  • Complete HTML5 Tags Reference
    A complete list of standard tags available in HTML5 is given below. All the tags are ordered alphabetically along with an indication if they have been introduced newly or they have been deprecated in HTML5.
  • HTML5 - SVG Tutorial
    SVG stands for Scalable Vector Graphics and it is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer.
  • Simple While Loop Example
    Repetive tasks are always a burden to us. Deleting spam email, sealing 50 envelopes, and going to work are all examples of tasks that are repeated. The nice thing about programming is that you can avoid such repitive tasks with a little bit of extra
  • HTML5 Deprecated Tags and Attributes
    The following elements are not available in HTML5 anymore and their function is better handled by CSS:

Kiriman terbaru