---
title: <mfenced>
slug: Web/MathML/Element/mfenced
tags:
  - MathML
  - 'MathML:Element'
  - Referenz
translation_of: Web/MathML/Element/mfenced
---
<div>{{MathMLRef}}</div>

<p class="summary">Mit dem<code> &lt;mfenced&gt;</code>-Element kann in MathML eine Aufzählung mit öffnenenden und schließenden Zeichen (Klammern) und mit Trennzeichen (Kommas, Semikolons) versehen werden. (engl. to fence = umklammern)</p>

<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 auf einzelne Elemente.</dd>
 <dt id="attr-close">close</dt>
 <dd>Ein Zeichen oder eine Zeichenkette für das <em>schließende</em> Trennzeichen. Ohne Angabe wird eine einfache schließende Klammer <code>")"</code> gesetzt. Leerzeichen innerhalb des Arguments werden ignoriert.</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-open">open</dt>
 <dd>Ein Zeichen oder eine Zeichenkette für das <em>öffnende</em> Trennzeichen. Ohne Angabe wird eine einfache öffnende Klammer <code>"("</code> gesetzt. Leerzeichen innerhalb des Arguments werden ignoriert.</dd>
 <dt id="attr-separators">separators</dt>
 <dd>Eine Folge von null oder mehr Trennzeichen für den Ausdruck. Mögliche Leerzeichen zwischen den Trennzeichen werden für die Ausgabe ignoriert. Der Vorgabewert ist das Komma ",". Werden mehrere Zeichen angegeben, dann werden diese in der Reihenfolge auf die Argumente des Ausdrucks angewandt. Überschüssige Trennzeichen werden ignoriert. Werden zu wenige Trennzeichen angegeben, dann wird das letzte bis zum Ende der Liste wiederholt.</dd>
</dl>

<h2 id="Beispiele">Beispiele</h2>

<h3 id="Das_letzte_Trennzeichen_wird_wiederholt_()">Das letzte Trennzeichen wird wiederholt (<code>,</code>)</h3>

<p>Beispieldarstellung: <img alt="{a;b;c,d,e}" src="/files/3193/mfenced01.png"></p>

<p>Darstellung in Deinem Browser: <math> <mfenced close="}" open="{" separators=";;,"> <mi>a</mi> <mi>b</mi> <mi>c</mi> <mi>d</mi> <mi>e</mi> </mfenced> </math></p>

<pre class="brush: html">&lt;math&gt;
  &lt;mfenced open="{" close="}" separators=";;,"&gt;
    &lt;mi&gt;a&lt;/mi&gt;
    &lt;mi&gt;b&lt;/mi&gt;
    &lt;mi&gt;c&lt;/mi&gt;
    &lt;mi&gt;d&lt;/mi&gt;
    &lt;mi&gt;e&lt;/mi&gt;
  &lt;/mfenced&gt;
&lt;/math&gt;
</pre>

<h3 id="Überschüssige_Trennzeichen_fallen_weg_()">Überschüssige Trennzeichen fallen weg (<code>,</code>)</h3>

<p>Beispieldarstellung: <img alt="[a|b|c|d|e]" src="/files/3195/mfenced02.png"></p>

<p>Darstellung in Deinem Browser: <math> <mfenced close="]" open="[" separators="||||,"> <mi>a</mi> <mi>b</mi> <mi>c</mi> <mi>d</mi> <mi>e</mi> </mfenced> </math></p>

<pre class="brush: html">&lt;math&gt;
  &lt;mfenced open="[" close="]" separators="||||,"&gt;
    &lt;mi&gt;a&lt;/mi&gt;
    &lt;mi&gt;b&lt;/mi&gt;
    &lt;mi&gt;c&lt;/mi&gt;
    &lt;mi&gt;d&lt;/mi&gt;
    &lt;mi&gt;e&lt;/mi&gt;
  &lt;/mfenced&gt;
&lt;/math&gt;
</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.mfenced', 'mfenced') }}</td>
   <td>{{ Spec2('MathML3') }}</td>
   <td>Current specification</td>
  </tr>
  <tr>
   <td>{{ SpecName('MathML2', 'chapter3.html#presm.mfenced', 'mfenced') }}</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>5.1</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>mathbackground</code></td>
   <td>{{CompatNo}}</td>
   <td>{{ CompatGeckoDesktop("2.0") }}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>5.1</td>
  </tr>
  <tr>
   <td><code>mathcolor</code></td>
   <td>{{CompatNo}}</td>
   <td>{{ CompatGeckoDesktop("2.0") }}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>5.1</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.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>mathbackground</code></td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{ CompatGeckoMobile("2.0") }}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
  <tr>
   <td><code>mathcolor</code></td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{ CompatGeckoMobile("2.0") }}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatNo}}</td>
  </tr>
 </tbody>
</table>
</div>