GO-V.ORG
As seen in

displaystyle

The displaystyle global attribute is a boolean setting the math-style of a MathML element.

The **`displaystyle`** [global attribute](/docs/Web/MathML/Reference/Global_attributes) is a boolean setting the [math-style](/docs/Web/CSS/Reference/Properties/math-style) of a MathML element.

## Example

In this example, an [munder](/docs/Web/MathML/Reference/Element/munder) element is used to attach a script "A" to a base "∑". By default, the summation symbol is rendered with the [font-size](/docs/Web/CSS/Reference/Properties/font-size) inherited from its parent and the A as a scaled down subscript. With the explicit `displaystyle="true"` attribute, the summation symbol is instead drawn bigger and the "A" becomes an underscript.

```css hidden
html,
body {
height: 100%;
}

body {
display: grid;
place-items: center;
font-size: 1.5rem;
}
```

```html
<math>
<munder>
<mo>∑</mo>
<mi>A</mi>
</munder>
<munder displaystyle="true">
<mo>∑</mo>
<mi>A</mi>
</munder>
</math>
```

## Syntax

```html-nolint
<math displaystyle="true">
<math displaystyle="false">
```

### Values

- `true`
- : Sets the display style to `normal`.
- `false`
- : Sets the display style to `compact`.

## Specifications

## Browser compatibility

## See also

- All [global attributes](/docs/Web/MathML/Reference/Global_attributes).
- The [scriptlevel](/docs/Web/MathML/Reference/Global_attributes/scriptlevel) global attribute.
- font-size
- math-depth
- math-style

source: MDN Web Docs mirror · page

Cite this

"displaystyle". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/MathML/Reference/Global_attributes/displaystyle

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·