HTML <math> Tag
Description
The <math> element is the top-level element of MathML, the markup language for mathematical notation. Everything inside it, such as <mi> (identifiers), <mn> (numbers), <mo> (operators), <mfrac> (fractions), <msup> (superscripts) and <msqrt> (square roots), is rendered as a formula by the browser, without images or JavaScript libraries.
The display attribute controls whether the formula is shown inline within the text (inline, the default) or as a centred block on its own line (block). Because MathML is real markup, formulas can be read by screen readers, scale with the text, and can be styled with CSS. MathML Core is supported in all major browsers since Chrome 109.
Properties
- Permitted Parents
- Any element that accepts phrasing content
- Content
- MathML elements
- Start/End Tags
- Start tag: required, End tag: required
Example
Attributes
- display
-
Whether the formula is rendered inline or as a block.
Possible Values:- inline
- block
- alttext
- A text alternative for the formula (deprecated in MathML Core; prefer making the markup itself accessible).
Global Attributes
The <math> tag also supports the Global Attributes in HTML5
Event Attributes
The <math> tag also supports the Event Attributes in HTML5
Browser Support
The following information will show you the current browser support for the HTML <math> tag. Hover over a browser icon to see the version that first introduced support for this HTML tag.
Desktop





Tablets & Mobile





