<ms>
The MathML <ms>
element represents a string literal meant to be interpreted by programming languages and computer algebra systems. By default, string literals are displayed as enclosed by double quotes ("
); by using the lquote
and rquote
attributes, you can set custom characters to display. Note that quotation marks should not be specified unless they are part of the string literal. The content of an <ms>
element is not an ASCII string per se, but rather a sequence of characters and <malignmark>
elements.
Attributes
- class, id, style
-
Provided for use with stylesheets.
- dir
-
The text direction. Possible values are either
ltr
(left to right) orrtl
(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, whendisplaystyle
is set totrue
. See alsomovablelimits
on<mo>
. - lquote
-
The opening quote character (depends on
dir
) to enclose the content. The default value is """.
- 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
andbig
. 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) ; -
bold
; -
italic
; -
bold-italic
;
-
double-struck
; -
bold-fraktur
; -
script
; -
bold-script
; -
fraktur
;
-
sans-serif
; -
bold-sans-serif
; -
sans-serif-italic
; -
sans-serif-bold-italic
; -
monospace
;
-
initial
; -
tailed
; -
looped
; -
stretched
;
-
- rquote
-
The closing quote mark (depends on
dir
) to enclose the content. The default value is """.
Examples
<math>
<ms lquote="„" rquote="""> abc </ms>
</math>
Specifications
Specification |
---|
MathML Core # string-literal-ms |
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.