--- title: <ms> slug: Web/MathML/Element/ms tags: - MathML - 'MathML:Element' - Referenz translation_of: Web/MathML/Element/ms --- <div>{{MathMLRef}}</div> <p class="summary">Das Element <code><ms></code> erzeugt in MathML die Darstellung eines <em>string literal</em>, also einer (buchstabengetreuen) Zeichenkette, wie sie z.B. in Programmiersprachen Anwendung findet.<br> Standardmäßig werden solche Zeichenketten in doppelten Anführungszeichen (<code>&quot;</code>) eingeschlossen.<br> Mit den Attributen <code>lquote</code> und <code>rquote</code> können eigene Zeichen für die öffnenden und schließenden Zeichen festgelegt werden.</p> <div class="note"> <p>Die Zeichenkette sollte ohne Anführungszeichen geschrieben werden, es sei denn, Anführungszeichen sind Bestandteil der Zeichenkette. Das <code><ms>-E</code>lement kann eine beliebige Folge von Zeichen, {{ MathMLElement("mglyph") }}- und {{ MathMLElement("malignmark") }}-Elementen enthalten.</p> </div> <h2 id="Attribute">Attribute</h2> <dl> <dt id="attr-class-id-style">class, id, style</dt> <dd>Zur Einbindung von <a href="https://developer.mozilla.org/de/docs/Web/CSS">CSS-Stylesheets</a> und zur direkten Anwendung von CSS-Angaben.</dd> <dt id="attr-dir">dir</dt> <dd>Allgemeine Schreibrichtung für die Formeln. Mögliche Werte sind <code>ltr</code> (left to right, von links nach rechts) und <code>rtl</code> (right to left, von rechts nach links).</dd> <dt id="attr-lquote">lquote</dt> <dd>Das <em>öffnende</em> Anführungszeichen (abhängig von <code><a href="#attr-dir">dir</a></code>). Der Vorgabewert ist "<code>&quot;"</code>.</dd> <dt id="attr-href">href</dt> <dd>Mit diesem Attribut kann ein Link gesetzt werden.</dd> <dt id="attr-mathbackground">mathbackground</dt> <dd>Die Hintergrundfarbe. Folgende Notationen sind erlaubt: <code><a href="https://developer.mozilla.org/de/docs/Web/CSS/Farben#rgb%28%29">#rgb</a></code>, <code><a href="https://developer.mozilla.org/de/docs/Web/CSS/Farben#rgb%28%29">#rrggbb</a></code> und <a href="https://developer.mozilla.org/de/docs/Web/CSS/Farben#Werte">HTML-Farbnamen</a>.</dd> <dt id="attr-mathcolor">mathcolor</dt> <dd>Die Textfarbe. Folgende Notationen sind erlaubt: <code><a href="https://developer.mozilla.org/de/docs/Web/CSS/Farben#rgb%28%29">#rgb</a></code>, <code><a href="https://developer.mozilla.org/de/docs/Web/CSS/Farben#rgb%28%29">#rrggbb</a></code> und <a href="https://developer.mozilla.org/de/docs/Web/CSS/Farben#Werte">HTML-Farbnamen</a>.</dd> <dt id="attr-mathsize">mathsize</dt> <dd>Die Größe (Höhe) des Inhalts. Möglich sind diese Angaben: <ul> <li><code>small</code>: Die Schrift wird kleiner dargestellt als die aktuelle Schrifthöhe.</li> <li><code>normal</code>: Dies entspricht 100% des aktuellen Schriftgrades = 1em.</li> <li><code>big</code>: Die Schrift wird größer dargestellt als die aktuelle Schrifthöhe.</li> <li>Eine Längenangabe (siehe <a href="https://developer.mozilla.org/de/docs/Web/CSS/length">length</a>).</li> <li>Ein einheitenloser Wert der als Faktor auf die aktuelle Schrifthöhe interpretiert wird.</li> </ul> </dd> <dt id="attr-mathvariant"> </dt> <dt id="attr-mathvariant">mathvariant</dt> <dd>Dieses Attribut bezeichnet die logische Klasse des Operators. Mit der logischen Klasse ist in der Regel eine bestimmte Typographie verbunden, in erster Linie ist dies aber aber eine semantische Einteilung. Abschnitte der gleichen Klasse werden gleichermaßen behandelt, was einen bestimmten Stil zur Folgen haben kann aber nicht muss. Die folgenden Werte sind erlaubt: <ul> <li><code>normal</code> (Standardwert für <em>mehr als ein Zeichen</em>) ; <math><mi mathvariant="normal">Example</mi></math></li> <li><code>bold</code> ; <math><mi mathvariant="bold">Example</mi></math></li> <li><code>italic</code> (Standardwert für<em> ein einzelnes Zeichen</em>) ; <math><mi mathvariant="italic">Example</mi></math></li> <li><code>bold-italic</code> ; <math><mi mathvariant="bold-italic">Example</mi></math></li> </ul> <ul> <li><code>double-struck</code> ; <math><mi mathvariant="double-struck">Example</mi></math></li> <li><code>bold-fraktur</code> ; <math><mi mathvariant="bold-fraktur">Example</mi></math></li> <li><code>script</code> ; <math><mi mathvariant="script">Example</mi></math></li> <li><code>bold-script</code> ; <math><mi mathvariant="bold-script">Example</mi></math></li> <li><code>fraktur</code> ; <math><mi mathvariant="fraktur">Example</mi></math></li> </ul> <ul> <li><code>sans-serif</code> ; <math><mi mathvariant="sans-serif">Example</mi></math></li> <li><code>bold-sans-serif</code> ; <math><mi mathvariant="bold-sans-serif">Example</mi></math></li> <li><code>sans-serif-italic</code> ; <math><mi mathvariant="sans-serif-italic">Example</mi></math></li> <li><code>sans-serif-bold-italic</code> ; <math><mi mathvariant="sans-serif-bold-italic">Example</mi></math></li> <li><code>monospace</code> ; <math><mi mathvariant="monospace">Example</mi></math></li> </ul> Die folgenden vier Werte betreffen nur arabische Schriften: <ul> <li><code>initial</code> ; <math><mi mathvariant="initial">مثال</mi></math></li> <li><code>tailed</code> ; <math><mi mathvariant="tailed">مثال</mi></math></li> <li><code>looped</code> ; <math><mi mathvariant="looped">مثال</mi></math></li> <li><code>stretched</code> ; <math><mi mathvariant="stretched">مثال</mi></math></li> </ul> </dd> <dt id="attr-rquote">rquote</dt> <dd>Das <em>schließende</em> Anführungszeichen (abhängig von <code><a href="#attr-dir">dir</a></code>). Der Vorgabewert ist "<code>&quot;".</code></dd> </dl> <h2 id="Beispiel">Beispiel</h2> <pre class="brush: html"><math> <ms lquote="„" rquote="“"> abc </ms> </math> </pre> <h2 id="Spezifikationen">Spezifikationen</h2> <table class="standard-table"> <thead> <tr> <th scope="col">Standard</th> <th scope="col">Status</th> <th scope="col">Bemerkung</th> </tr> </thead> <tbody> <tr> <td>{{ SpecName('MathML3', 'chapter3.html#presm.ms', 'ms') }}</td> <td>{{ Spec2('MathML3') }}</td> <td>Current specification</td> </tr> <tr> <td>{{ SpecName('MathML2', 'chapter3.html#presm.ms', 'ms') }}</td> <td>{{ Spec2('MathML2') }}</td> <td>Initial specification</td> </tr> </tbody> </table> <h2 id="Browserkompatibilität">Browserkompatibilität</h2> <p>{{CompatibilityTable}}</p> <div id="compat-desktop"> <table class="compat-table"> <tbody> <tr> <th>Merkmal</th> <th>Chrome</th> <th>Firefox (Gecko)</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari</th> </tr> <tr> <td>Basic support</td> <td>{{CompatNo}}</td> <td>{{ CompatGeckoDesktop("1.0") }}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> </tr> <tr> <td><code>dir</code></td> <td>{{CompatNo}}</td> <td>{{ CompatGeckoDesktop("12.0") }}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> </tr> <tr> <td><code>href</code></td> <td>{{CompatNo}}</td> <td>{{ CompatGeckoDesktop("7.0") }}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> </tr> <tr> <td><code>mathsize</code></td> <td>{{CompatNo}}</td> <td>{{ CompatGeckoDesktop("1.0") }}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> </tr> <tr> <td><code>mathvariant</code></td> <td>{{CompatNo}}</td> <td>{{ CompatGeckoDesktop("28.0") }}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> </tr> </tbody> </table> </div> <div id="compat-mobile"> <table class="compat-table"> <tbody> <tr> <th>Merkmal</th> <th>Android</th> <th>Chrome for Android</th> <th>Firefox Mobile (Gecko)</th> <th>IE Mobile</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Basic support</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> <td>{{ CompatGeckoMobile("1.9.2") }}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> </tr> <tr> <td><code>dir</code></td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> <td>{{ CompatGeckoMobile("12.0") }}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> </tr> <tr> <td><code>href</code></td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> <td>{{ CompatGeckoMobile("7.0") }}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> </tr> <tr> <td><code>mathsize</code></td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> <td>{{ CompatGeckoMobile("1.9.2") }}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> </tr> <tr> <td><code>mathvariant</code></td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> <td>{{ CompatGeckoMobile("28.0") }}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> <td>{{CompatNo}}</td> </tr> </tbody> </table> </div> <h2 id="Hinweise_zu_Gecko">Hinweise zu Gecko</h2> <ul> <li>Seit Gecko 20.0 {{geckoRelease("20.0")}} sind einheitenlose Wertangaben für <code>mathsize</code> erlaubt.</li> <li>Einige <code>mathvariant</code> sind erst seit Gecko 28.0 (Firefox 28.0 / Thunderbird 28.0 / SeaMonkey 2.25) umgesetzt und erfordern passende <a href="/de/docs/Mozilla/MathML_Project/Fonts">Schriftarten für MathML</a>.</li> </ul> <p> </p>