HTML5 MathML

HTML5 MathML <mn> Tag

The <mn> tag represents a numeric literal - an integer, decimal or other number that appears in a formula. Numbers are rendered upright by default.


Definition and usage

The <mn> element wraps a number so the browser treats it as a mathematical numeric token. Unlike identifiers, numbers are shown in an upright (non-italic) style. Group a number with adjacent identifiers using <mrow> to build terms such as 4ac.

Syntax

<mn>number</mn>

Example

A decimal number in an equation
<math>
  <mrow>
    <mi>&#960;</mi>
    <mo>&#8776;</mo>
    <mn>3.14159</mn>
  </mrow>
</math>

The number 3.14159 sits inside <mn> and is displayed upright, following the approximation operator.

ℹ️

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