displaystyle
Baseline 2023Newly available
Since January 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
The displaystyle
global attribute is a boolean setting the math-style of a MathML element.
Example
In this example, an munder element is used to attach a script "A" to a base "∑". By default, the summation symbol is rendered with the 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.
html
<math>
<munder>
<mo>∑</mo>
<mi>A</mi>
</munder>
<munder displaystyle="true">
<mo>∑</mo>
<mi>A</mi>
</munder>
</math>
Syntax
html
<math displaystyle="true">
<math displaystyle="false">
Values
Specifications
Specification |
---|
MathML Core # dfn-displaystyle |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
displaystyle |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
See also
- All global attributes.
- The scriptlevel global attribute.
font-size
math-depth
math-style