# <mtext>

The MathML <mtext> element is used to render arbitrary text with no notational meaning, such as comments or annotations.

To display text with notational meaning, use `<mi>` and `<mo>` instead.

## 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).
`displaystyle`
A Boolean value specifying whether more vertical space is used for displayed equations or, if set to `false`, a more compact layout is used to display formulas. The main effect is that larger versions of operators are displayed, when `displaystyle` is set to `true`. See also `movablelimits` on `<mo>`.
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 attribute specifies the 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) ; $\mathrm{\text{Example}}$
• `bold` ; $\mathbf{\text{Example}}$
• `italic` ; $\mathit{\text{Example}}$
• `bold-italic` ; $\mathbit{\text{Example}}$
• `double-struck` ; $\mathbb{\text{Example}}$
• `bold-fraktur` ; ${\text{Example}}$
• `script` ; $\mathcal{\text{Example}}$
• `bold-script` ; $\mathsc{\text{Example}}$
• `fraktur` ; $\mathfrak{\text{Example}}$
• `sans-serif` ; $\mathsf{\text{Example}}$
• `bold-sans-serif` ; $\mathbsf{\text{Example}}$
• `sans-serif-italic` ; $\mathsfit{\text{Example}}$
• `sans-serif-bold-italic` ; $\mathbsfit{\text{Example}}$
• `monospace` ; $\mathtt{\text{Example}}$
• `normal` (Default) ; $\text{مثال}$
• `initial` ; ${\text{مثال}}$
• `tailed` ; ${\text{مثال}}$
• `looped` ; ${\text{مثال}}$
• `stretched` ; ${\text{مثال}}$

## Examples

``````<math>

<mtext> Theorem of Pythagoras </mtext>

<mtext> /* comment here */ </mtext>

</math>
``````

Specification
MathML Core
# text-mtext

## Browser compatibility

BCD tables only load in the browser

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