This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

<mfenced>

Deprecated

Avoid using this feature in new projects. Only MathML Core (a subset of MathML Full) is designed to work with web technologies, such as CSS. This feature may be a candidate for removal from web standards or browsers.

Consider using the following features instead: MathML.

Элемент MathML <mfenced> обеспечивает возможность добавить по выбору открывающие и закрывающие скобки (например, квадратные) и разделители (например, запятую или точку с запятой)

Атрибуты

class, id, style

Предполагается использование с таблицами стилей.

close

Строка для закрывающего разделителя. Значением по умолчанию является ")" и все пробелы обрезаются.

href

Используется для установки гиперссылки на указанный URI.

mathbackground

Цвет фона. Вы можете использовать #rgb, #rrggbb и имена цветов HTML.

mathcolor

Цвет текста и также цвет линии дроби. Вы можете использовать #rgb, #rrggbb и имена цветов HTML.

open

Строка для открывающего разделителя. Значением по умолчанию является "(" и все пробелы обрезаются.

separators

A sequence of zero or more characters to be used for different separators, optionally divided by white space, which is ignored. The default value is ",". By specifying more than one character, it is possible to set different separators for each argument in the expression. If there are too many separators, all excess is ignored. If there are too few separators in the expression, the last specified separator is repeated.

Examples

The last separator is repeated (,)

Sample rendering: {a;b;c,d,e}

Rendering in your browser: a b c d e

html
<math>
  <mfenced open="{" close="}" separators=";;,">
    <mi>a</mi>
    <mi>b</mi>
    <mi>c</mi>
    <mi>d</mi>
    <mi>e</mi>
  </mfenced>
</math>

All excess is ignored (,)

Sample rendering: [a|b|c|d|e]

Rendering in your browser: a b c d e

html
<math>
  <mfenced open="[" close="]" separators="||||,">
    <mi>a</mi>
    <mi>b</mi>
    <mi>c</mi>
    <mi>d</mi>
    <mi>e</mi>
  </mfenced>
</math>

Спецификации

This feature does not appear to be defined in any specification.

Совместимость с браузерами