Skip to content

Commit

Permalink
Update MathML documentation about the <ms> element (#21248)
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-wang committed Oct 3, 2022
1 parent 1b6a1ae commit a2fa752
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions files/en-us/web/mathml/element/ms/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,41 @@ browser-compat: mathml.elements.ms

{{MathMLRef}}

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 (`&quot;`); 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 {{ MathMLElement("malignmark") }} elements.
The MathML `<ms>` element represents a _string literal_ meant to be interpreted by programming languages and computer algebra systems.

## Attributes

This element's attributes include the [global MathML attributes](/en-US/docs/Web/MathML/Global_attributes).

Some browsers may also support the following deprecated attributes and will render the content of the `<ms>` element surrounded by the specified opening and closing quotes:

- `lquote`
- : The opening quote character (depends on [`dir`](#attr-dir)) to enclose the content. The default value is "`&quot;".`
- : The opening quote to enclose the content. The default value is `&quot;`.

- `rquote`
- : The closing quote mark (depends on [`dir`](#attr-dir)) to enclose the content. The default value is "`&quot;".`
- : The closing quote to enclose the content. The default value is `&quot;`.

## Examples

### Default rendering

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

{{ EmbedLiveSample('default_rendering', 700, 200, "", "") }}

### Legacy quote attributes

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

{{ EmbedLiveSample('ms_example', 700, 200, "", "") }}
{{ EmbedLiveSample('legacy_quote_attributes', 700, 200, "", "") }}

## Specifications

Expand Down

0 comments on commit a2fa752

Please sign in to comment.