Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/web/mathml/global_attributes/displaystyle/index.md
6568 views
---
title: displaystyle slug: Web/MathML/Global_attributes/displaystyle browser-compat: mathml.global_attributes.displaystyle
---

{{QuickLinksWithSubPages("/en-us/docs/Web/MathML/Global_attributes")}}

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.

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

Syntax

<math displaystyle="true"></math> <math displaystyle="false"></math>

Values

  • true

    • : Sets the display style to normal.

  • false

    • : Sets the display style to compact.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also