↑ arvau

MDN / MathML attribute values

MathML-specific types

In addition to CSS data types, some MathML attributes accept the following types:

  • <unsigned-integer>: An <integer>, whose first character is neither U+002D HYPHEN-MINUS character (-) nor U+002B PLUS SIGN (+); for example 1234.

  • <boolean>: A string true or false representing a boolean value.

Legacy MathML lengths

Instead of , MathML used to define its own type to describe lengths. Accepted values included non-zero unitless length values (e.g., 5 to mean 500%), values containing numbers ending with a dot (e.g., 34.px), or named spaces (e.g., thinmathspace). For compatibility reasons, it is recommended to replace non-zero unitless length values with equivalent values, to remove unnecessary dots in numbers, and to use the following replacement for named lengths:

veryverythinmathspace  => 0.05555555555555555em
verythinmathspace      => 0.1111111111111111em
thinmathspace          => 0.16666666666666666em
mediummathspace        => 0.2222222222222222em
thickmathspace         => 0.2777777777777778em
verythickmathspace     => 0.3333333333333333em
veryverythickmathspace => 0.3888888888888889em

Units

UnitDescriptionemunitexunit. (The “x”-height of the element, 1ex ≈ 0.5em in many fonts)pxPixelsinInches (1 inch = 2.54 centimeters)cmCentimetersmmMillimetersptPoints (1 point = 1/72 inch)pcPicas (1 pica = 12 points)%Percentage of the default value.

Constants

ConstantValueveryverythinmathspace1/18 emverythinmathspace2/18 emthinmathspace3/18 emmediummathspace4/18 emthickmathspace5/18 emverythickmathspace6/18 emveryverythickmathspace7/18 emnegativeveryverythinmathspace-1/18 emnegativeverythinmathspace-2/18 emnegativethinmathspace-3/18 emnegativemediummathspace-4/18 emnegativethickmathspace-5/18 emnegativeverythickmathspace-6/18 emnegativeveryverythickmathspace-7/18 em

Browser compatibility