docs.rodeo

MDN Web Docs mirror

{{MathMLRef}}Β 

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

This element also accepts the global MathML attributes.

Examples

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

{{ EmbedLiveSample('mi_example', 400, 100) }}Β 

Technical summary

Implicit ARIA role None

Specifications

{{Specifications}}Β 

Browser compatibility

{{Compat}}Β 

In this article

View on MDN