HTML5 MathML
HTML5 MathML <mmultiscripts> Tag
The <mmultiscripts> element attaches several subscripts and superscripts to a base at once, on both the right (postscripts) and the left (prescripts). It is ideal for tensor notation and isotopes.
Definition and Usage
The first child is the base. After it come postscript pairs in the order subscript, superscript. The empty <mprescripts/> marker separates postscripts from prescripts, which follow in the same subscript-then-superscript order. Use <none/> where a slot is empty.
Syntax
<mmultiscripts>
<mi>X</mi> <!-- base -->
<mn>1</mn><mn>2</mn> <!-- post sub, post sup -->
<mprescripts/>
<mn>3</mn><mn>4</mn> <!-- pre sub, pre sup -->
</mmultiscripts>Example
This writes a carbon-14 isotope, with the mass number and atomic number as prescripts on the element symbol.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MathML mmultiscripts</title>
</head>
<body>
<math display="block">
<mmultiscripts>
<mi>C</mi>
<none/><none/>
<mprescripts/>
<mn>6</mn>
<mn>14</mn>
</mmultiscripts>
</math>
</body>
</html><mmultiscripts>, <mprescripts> and <none> are part of MathML Core and render in modern Chrome, Edge, Firefox and Safari.
Key Takeaways
- <mmultiscripts> attaches multiple scripts on both sides of a base.
- Scripts come in subscript-then-superscript pairs; use <none/> for empty slots.
- <mprescripts/> marks where left-side prescripts begin.
