<mi>

The MathML <mi> element indicates that the content should be rendered as an identifier such as function names, variables or symbolic constants. You can also have arbitrary text in it to mark up terms.

Attributes

class, id, style
Provided for use with stylesheets.
dir
The text direction. Possible values are either ltr (left to right) or rtl (right to left).
href
Used to set a hyperlink to a specified URI.
mathbackground
The background color. You can use #rgb, #rrggbb and HTML color names.
mathcolor
The text color. You can use #rgb, #rrggbb and HTML color names.
mathsize
The size of the content. See length for possible values.
Deprecated values are: small, normal and big. These will be removed in the future.
mathvariant
This logical class of the identifier, which varies in typography. That is, although the names suggest the typographic style for the class, semantically, items with the same class are treated "the same" within an expression, which might or might not involve displaying them with the named typography. The following values are allowed:
  • normal (Default value for more than one character) ; Example
  • bold ; Example
  • italic (Default value for a single character) ; Example
  • bold-italic ; Example
  • double-struck ; Example
  • bold-fraktur ; Example
  • script ; Example
  • bold-script ; Example
  • fraktur ; Example
  • sans-serif ; Example
  • bold-sans-serif ; Example
  • sans-serif-italic ; Example
  • sans-serif-bold-italic ; Example
  • monospace ; Example
  • initial ; مثال
  • tailed ; مثال
  • looped ; مثال
  • stretched ; مثال

Examples

<math>

  <mi> y </mi> 

  <mi> sin </mi>

  <mi mathvariant="monospace"> x </mi>

  <mi mathvariant="bold"> &pi; </mi>

</math>

Specifications

Specification Status Comment
MathML 3.0
The definition of 'mi' in that specification.
Recommendation Current specification
MathML 2.0
The definition of 'mi' in that specification.
Recommendation Initial specification

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
miChrome No support NoEdge No support NoFirefox Full support 1IE No support NoOpera No support NoSafari Full support 6WebView Android No support NoChrome Android No support NoFirefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
dirChrome No support NoEdge No support NoFirefox Full support 12IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android Full support 14Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
hrefChrome No support NoEdge No support NoFirefox Full support 7IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android Full support 7Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
mathsizeChrome No support NoEdge No support NoFirefox Full support 1IE No support NoOpera No support NoSafari Full support 6WebView Android No support NoChrome Android No support NoFirefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
mathvariantChrome No support NoEdge No support NoFirefox Full support 28IE No support NoOpera No support NoSafari Full support 6WebView Android No support NoChrome Android No support NoFirefox Android Full support 28Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No

Legend

Full support
Full support
No support
No support

Gecko-specific notes

  • Some mathvariant values are only implemented starting with Gecko 28.0 (Firefox 28.0 / Thunderbird 28.0 / SeaMonkey 2.25) and require appropriate math fonts.