MathML 2026-11-05
MathML is a markup language for mathematical notation, structure and content on the web. Its elements describe expressions within a document rather than reducing a formula to a flat character string. MathML Core specifies a subset suited to web browser implementation; the cited 24June2025 document is a Candidate Recommendation Snapshot.[ref]
Consider the typeset fraction . A presentation encoding is <math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow><mn>2</mn></mfrac></math>. The mi, mo and mn elements identify a symbolic name, an operator and numbers. The mrow groups the numerator; the two children of mfrac provide the numerator and denominator.[ref]
Grouping changes the represented expression. At , the intended fraction gives , whereas . This arithmetic illustrates the meaning assigned to the structure; MathML presentation markup does not itself execute the calculation. Maintaining a structured representation helps document tools manipulate a formula and lets layout follow its mathematical grouping.
A stretchy mathematical operator can adapt its extent to the surrounding mathematical layout. In MathML Core, an mo element's stretchy property participates in this decision. A mathematical delimiter around a tall typeset fraction is a familiar example. Actual stretching also requires an applicable constraint and suitable computer font data.[ref]
For an original example, use <math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mo stretchy="true" minsize="2em" maxsize="3em">(</mo><mfrac><mi>x</mi><mn>2</mn></mfrac><mo stretchy="true" minsize="2em" maxsize="3em">)</mo></mrow></math>. The row places two mathematical delimiters around a typeset fraction with numerator and denominator 2.
Suppose the positive block-axis target totals, already expressed at a common scale, are , and em. The stated size bounds adjust them to , and em, respectively. This is the target-size constraint step, not a prediction of exact rendered ink heights. The complete algorithm also handles ascent/descent and symmetry about the Math axis.[ref]
Suitable mathematical glyph variants or mathematical glyph assemblies can supply the extended form. Setting stretchy="false" changes the operator's instruction without changing the fraction's two operands. Layout properties and font constructions therefore belong in a controlled comparison; enlarging every outline uniformly is not the definition of stretching.