MathML

Mathematical Markup Language is an application of XML for describing mathematical notations and capturing both its structure and content. It aims at integrating mathematical formulae into World Wide Web pages and other documents. It is a recommendation of the W3C math working group.

Presentation and semantics
MathML deals not only with the presentation but also the meaning of formula components (the latter part of MathML is known as “Content MathML”). Because the meaning of the equation is preserved separate from the presentation, how the content is communicated can be left up to the user. For example, web pages with MathML embedded in them can be viewed as normal web pages with many browsers but visually impaired users can also have the same MathML read to them through the use of screen readers (e.g. using the MathPlayer plugin for Internet Explorer, Opera 9.50 build 9656+ or the Fire Vox extension for Firefox).

Presentation MathML
Presentation MathML focuses on the display of an equation, and has about 30 elements, and 50 attributes. The elements all begin with  and include token element:   - identifiers;   - operators;   - number. Tokens are combined using layout elements that include:  - a row;   - superscripts;   - fractions. The attributes mainly control fine details of the presentation. A large number of entities are available that represent letters, symbols   and some non-visible character such as   representing multiplication.

For valid XML documents as per the W3C specifications, a MathML file must have a  declaration:

Thus, the expression $$a x^2+b x+c$$ could be represented in a valid MathML file as:

Content MathML
Content MathML focuses on the semantic meaning of the expression. Central to Content MathML is the  element that represents a function or operator, given in the first child, applied to the remaining child elements. For example  represents $$\sin(x)$$ and   represents x+5. The  element represents an identifier,   a number, and there are over a hundred different elements for different functions and operators. Content MathML uses only a few attributes.

The expression $$a x^2+b x+c$$ could be represented as

Embedding MathML in HTML5 files
Inline MathML is also supported in HTML5 files in the upcoming versions of WebKit (Safari, Chrome), Gecko (Firefox) and Presto (Opera).

e.g. math-test.html: