<ms>

Baseline 2023
Newly available

Since January 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

<ms> MathML 元素表示要由编程语言和计算机代数系统解释的字符串字面量。

属性

此元素包括全局 MathML 属性

某些浏览器还可能支持以下已弃用属性,并将 <ms> 元素的内容用指定的开引号和闭引号包围起来:

lquote

用于包围内容的开引号。默认值为 &quot;

rquote

用于包围内容的闭引号。默认值为 &quot;

示例

默认渲染

html
<math display="block">
  <ms>Hello World!</ms>
</math>

旧版 quote 属性

html
<math display="block">
  <ms lquote="" rquote="'">abc</ms>
</math>

规范

Specification
MathML Core
# string-literal-ms

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
ms

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support