| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/en-US/docs/Web/MathML | [Back] [Original] |
Get to know MDN better
This feature is well established and works across many devices and browser versions. Its been available across browsers since January 2023.
Mathematical Markup Language (MathML) is an XML-based language for describing mathematical notation.
MathML was originally designed as a general-purpose specification for browsers, office suites, computer algebra systems, EPUB readers, LaTeX-based generators. However, this approach was not very adapted to the Web: the subset focusing on semantics has never been implemented in browsers while the subset focusing on math layout led to incomplete and inconsistent browser implementations.
MathML Core is a subset with increased implementation details based on rules from LaTeX and the Open Font Format. It is tailored for browsers and designed specifically to work well with other web standards including HTML, CSS, DOM, JavaScript.
Below you will find links to documentation, examples, and tools to work with MathML. MDN uses MathML Core as a reference specification but, due to an erratic standardization history, legacy MathML features may still show up in existing implementations and web content.
Note: It is highly recommended that developers and authors switch to MathML Core, perhaps relying on other web technologies to cover missing use cases. The Math WG is maintaining a set of MathML polyfills to facilitate that transition.
The MathML tutorials are designed to walk you through topics assuming that you have no prior experience, starting from the basics and progressing to more advanced techniques.
This tutorial will guide you through creating math formulas using structured markup. It starts with an introduction to adding MathML to an HTML document, followed by a deep dive into key components: fractions and roots, scripted elements, and text containers. The tutorial then covers tabular layouts for matrices and advanced math formatting. Finally, a challenge tests your understanding by having you recreate three famous mathematical formulas using the learned concepts.
The MathML guides are resources that help you author MathML on your web pages, including guidance on writing, editors, fonts and more.
Suggestions and tips for writing MathML, including suggested MathML editors and how to integrate their output into Web content.
How users can install such math fonts to properly display MathML in browsers.
The MathML reference is a comprehensive list of MathML elements and attributes that are documented on MDN.
Details about each MathML element and compatibility information for desktop and mobile browsers.
Information about global MathML attributes applicable to all elements.
Information about MathML attributes that modify the appearance or behavior of elements.
Further information about MathML attribute values.
Below you'll find some examples you can look at to help you to understand how to use MathML.
The following demos display increasingly complex mathematical concepts in Web content.
Small example showing a proof of the Pythagorean Theorem.
Outlines the derivation of the Quadratic Formula.
Original test from the Mozilla MathML project. It contains examples from the TeXbook with image references generated by TeX.
The following demos mix MathML with other Web technologies to produce advanced content.
<la-tex> custom elementA custom element that accepts LaTeX content.
A 3D representation of a magnetic field, using SVG and WebGL.
A greek article about the Riemann zeta function, with Web fonts from the Greek Font Society.
A JavaScript program to solve Pell's equation using BigInt.
An emulator for Ada Lovelace's program to calculate Bernoulli numbers, using Private elements.
| Specification |
|---|
| Mathematical Markup Language (MathML) Version 4.0 |
This page was last modified on Sep 15, 2025 by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |