We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

我们的志愿者还没有将这篇文章翻译为 中文 (简体)加入我们帮助完成翻译
您也可以阅读此文章的English (US)版。

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.


class, id, style
Provided for use with stylesheets.
The text direction. Possible values are either ltr (left to right) or rtl (right to left).
Used to set a hyperlink to a specified URI.
The background color. You can use #rgb, #rrggbb and HTML color names.
The text color. You can use #rgb, #rrggbb and HTML color names.
The size of the content. Possible values are:
  • small: Font is rendered smaller than the current font size.
  • normal: Equivalent to 100% or 1em.
  • big: Font is rendered larger than the current font size.
  • a custom length.
  • or a unitless value which multiplies the default.
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 ; مثال



  <mi> y </mi>  

  <mi> sin </mi>

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

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



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


FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No ?1 No No6
dir No ?12 No No No
href No ?7 No No No
mathsize No ?1 No No6
mathvariant No ?28 No No6
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No No ?4 No No ?
dir No No ?14 No No ?
href No No ?7 No No ?
mathsize No No ?4 No No ?
mathvariant No No ?28 No No ?


Gecko-specific notes

  • Starting with Gecko 20.0 (Firefox 20.0 / Thunderbird 20.0 / SeaMonkey 2.17) a unitless value for mathsize is allowed.
  • 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.


此页面的贡献者: lucian95, fscholz, fred.wang, Sheppy, jswisher
最后编辑者: lucian95,