Get to know MDN better
A CSS declaration block is an ordered collection of CSS properties and values. It is represented in the DOM as a CSSStyleDeclaration.
Each property and value pairing is known as a CSS declaration. The CSS declaration block has the following associated properties:
computed flagSet if the CSSStyleDeclaration object is a computed rather than specified style. Unset by default.
declarationsThe CSS declarations associated with this object.
parent CSS ruleThe CSSRule that the CSS declaration block is associated with, otherwise null.
owner nodeThe element that the CSS declaration block is associated with, otherwise null.
updating flagSet when the CSS declaration block is updating the owner node's style attribute.
When a CSSStyleDeclaration is returned by a CSS Object Model (CSSOM) interface these properties are set to appropriate values as defined by the specification.
The following example shows a CSS rule with a declaration block for the h1 element. The CSS declaration block is the lines between the curly braces.
We can return a CSSStyleDeclaration representing this CSS declaration block using CSSStyleRule.style.
| CSS Object Model (CSSOM) # css-declaration-blocks |
This page was last modified on Apr 10, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.