HTML5 MathML

HTML5 MathML <mi> Tag

The <mi> tag represents an identifier - a variable, a constant, or a function name. Single-letter identifiers are rendered in italics by default, matching mathematical convention.


Definition and usage

The <mi> element holds a mathematical identifier. Browsers automatically italicise a single-character identifier (like x) but display multi-character names (like sin) upright. You can override the style with the mathvariant attribute, choosing values such as bold, italic, or double-struck.

Syntax

<mi mathvariant="normal">identifier</mi>

Example

Variables and a function name
<math>
  <mrow>
    <mi>sin</mi>
    <mo>&#8289;</mo>
    <mi>x</mi>
  </mrow>
</math>

Here sin is a multi-letter identifier shown upright, while x is a single letter shown in italics. The invisible operator (&#8289;) marks function application between them.

ℹ️

The <mi> element is part of MathML Core and is supported by all modern browsers.

Ready to use your HTML skills?

Find web development internships and fresher jobs across India.

Browse Web Dev Internships