concept

Mathml script sizing — CSS reference

MathML conveys the structure of an exponent; the browser normally adjusts script depth and font size without manual positioning. The exponent sits above the base baseline.

Formal Syntax & Structure

css syntaxcss
<math><msup><mi>x</mi><mn>2</mn></msup></math>

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>MathML script sizing</title><style>body{margin:8px;font:32px/1.5 monospace;color:#172033;background:white}rt{font:16px/1.2 monospace}math{font-size:40px}
</style><body><math id="m"><msup><mi id="b">x</mi><mn id="t">2</mn></msup></math></body></html>
CSS Reference