<mi>

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s 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.

Attributes

mathvariant

The only value allowed in the current specification is normal (case insensitive):

normal

Use 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.

Examples

html
<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>

Technical summary

Implicit ARIA role None

Specifications

Specification
MathML Core
# dfn-mi

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
mi
Chrome – Full support
Chrome 109 (Release date: 2023-01-10)
footnote Full support
Edge – Full support
Edge 109 (Release date: 2023-01-12)
footnote Full support
Firefox – Full support
Firefox 1 (Release date: 2004-11-09)
footnote Full support
Opera – Full support
Opera 95 (Release date: 2023-02-01)
footnote Full support
Safari – Full support
Safari 6 (Release date: 2012-07-25)
footnote Full support
Chrome Android – Full support
Chrome Android 109 (Release date: 2023-01-10)
footnote Full support
Firefox for Android – Full support
Firefox for Android 4 (Release date: 2011-03-29)
footnote Full support
Opera Android – Full support
Opera Android 74 (Release date: 2023-03-13)
footnote Full support
Safari on iOS – Full support
Safari on iOS 6 (Release date: 2012-09-10)
footnote Full support
Samsung Internet – Full support
Samsung Internet 21 (Release date: 2023-05-19)
footnote Full support
WebView Android – Full support
WebView Android 109 (Release date: 2023-01-10)
footnote Full support
WebView on iOS – Full support
WebView on iOS 6 (Release date: 2012-09-10)
footnote Full support
mathvariant
Chrome – Full support
Chrome 109 (Release date: 2023-01-10)
footnote Full support
Edge – Full support
Edge 109 (Release date: 2023-01-12)
footnote Full support
Firefox – Full support
Firefox 70 (Release date: 2019-10-22)
footnote
footnote The only allowed value in MathML Core is 'normal'. Firefox enables a number of other deprecated values from the MathML 3 specification (see bug 1845461).
footnote Implementation does not rely on the CSS approach described in MathML Core (via text-transform.
footnote See https://hg.mozilla.org/mozilla-central/rev/3b30c8db537c
Opera – Full support
Opera 95 (Release date: 2023-02-01)
footnote Full support
Safari – Full support
Safari 10 (Release date: 2016-09-20)
footnote
footnote The only allowed value in MathML Core is 'normal'. Safari enables a number of other deprecated values from the MathML 3 specification.
footnote Implementation does not rely on the CSS approach described in MathML Core (via text-transform.
footnote See https://trac.webkit.org/changeset/203679
Chrome Android – Full support
Chrome Android 109 (Release date: 2023-01-10)
footnote Full support
Firefox for Android – Full support
Firefox for Android 79 (Release date: 2020-07-28)
footnote
footnote The only allowed value in MathML Core is 'normal'. Firefox for Android enables a number of other deprecated values from the MathML 3 specification (see bug 1845461).
footnote Implementation does not rely on the CSS approach described in MathML Core (via text-transform.
footnote See https://hg.mozilla.org/mozilla-central/rev/3b30c8db537c
Opera Android – Full support
Opera Android 74 (Release date: 2023-03-13)
footnote Full support
Safari on iOS – Full support
Safari on iOS 10 (Release date: 2016-09-13)
footnote
footnote The only allowed value in MathML Core is 'normal'. Safari on iOS enables a number of other deprecated values from the MathML 3 specification.
footnote Implementation does not rely on the CSS approach described in MathML Core (via text-transform.
footnote See https://trac.webkit.org/changeset/203679
Samsung Internet – Full support
Samsung Internet 21 (Release date: 2023-05-19)
footnote Full support
WebView Android – Full support
WebView Android 109 (Release date: 2023-01-10)
footnote Full support
WebView on iOS – Full support
WebView on iOS 10 (Release date: 2016-09-13)
footnote
footnote The only allowed value in MathML Core is 'normal'. WebView on iOS enables a number of other deprecated values from the MathML 3 specification.
footnote Implementation does not rely on the CSS approach described in MathML Core (via text-transform.
footnote See https://trac.webkit.org/changeset/203679

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
See implementation notes.