| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/en-US/docs/Web/MathML/Reference/Element/mi | [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.
The <mi> MathML element indicates that the content should be rendered as an identifier, such as a function name, variable or symbolic constant.
By default <mi> elements that contain multiple characters are a rendered as normal text, while single character characters are rendered as italic: the same formatting behavior as the CSS text-transform property with a value of math-auto.
The mathvariant attribute with a value of normal can be used to reset a single character to the normal font.
In order to use a particular form of a character such as bold/italic, serif, sans-serif, script/calligraphy, monospaced, double-struck, and so on, you should use the appropriate Mathematical Alphanumeric Symbols.
Note:
In a previous specification (MathML3), the mathvariant attribute was used to define logical classes that could apply the character formatting for mathematical alphanumeric symbols.
The associated values are now deprecated, and expected to be removed from browsers in future releases.
mathvariantThe only value allowed in the current specification is normal (case insensitive):
normalUse default/normal rendering, removing automatic styling of single characters to italic.
Deprecated legacy values are:
bold Try and use bold characters e.g., "".
italic Try and use italic characters e.g., "".
bold-italic Try and use bold-italic characters e.g., "".
double-struck Try and use double-struck characters e.g., "".
bold-fraktur Try and use bold-fraktur characters e.g., "".
script Try and use script characters e.g., "".
bold-script Try and use bold-script characters e.g., "".
fraktur Try and use fraktur characters e.g., "".
sans-serif Try and use sans-serif characters e.g., "".
bold-sans-serif Try and use bold-sans-serif characters e.g., "".
sans-serif-italic Try and use sans-serif-italic characters e.g., "".
sans-serif-bold-italic Try and use sans-serif-bold-italic characters e.g., "".
monospace Try and use monospace characters e.g., "".
initial Try and use initial characters e.g., "".
tailed Try and use tailed characters e.g., "".
looped Try and use looped characters e.g., "".
stretched Try and use stretched characters e.g., "".
This element also accepts the global MathML attributes.
<math display="block">
<!-- Multiple characters render as "normal" text -->
<mi>sin</mi>
</math>
<hr />
<math display="block">
<!-- Single characters render as italic by default (i.e. "A" renders as "") -->
<mi>A</mi>
</math>
<hr />
<math display="block">
<!-- Use mathvariant="normal" to make single character render as normal text -->
<mi mathvariant="normal">F</mi>
</math>
<hr />
<math display="block">
<!-- To use a specific variant, such as "B" in Fraktur -->
<mi></mi>
</math>
| Implicit ARIA role | None |
|---|
| Specification |
|---|
| MathML Core # dfn-mi |
This page was last modified on Dec 17, 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 |