Get to know MDN better
A CSS declaration is an abstract concept not exposed as an object in the DOM. It represents a CSS property and value pairing.
A CSS declaration has the following associated properties:
property nameThe property name of the declaration, for example background-color.
valueThe value of the declaration as a list of component values.
important flagEither set or unset.
case-sensitive flagSet if the property name is defined to be case-sensitive according to the specification, otherwise unset.
The following example shows a CSS rule with a CSS declaration block for the <h1> element. The CSS declaration block is the lines between the curly braces, it contains two CSS declarations. One for font-style and another for color.
| CSS Object Model (CSSOM) # css-declarations |
This page was last modified on Sep 23, 2024 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.