The property is the CSSStyleDeclaration interface for the declaration block of the CSSRule.


styleObj =


function stilo() {
// displays "background-color: gray;"


The declaration block is that part of the style rule that appears within the braces and that actually provides the style definitions (for the selector, the part that comes before the braces).

See also


DOM Level 2 CSS: styleCSSR

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes Yes Yes9 Yes Yes
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes Yes Yes Yes Yes Yes ?

Document Tags and Contributors

Contributors to this page: fscholz, mfluehr, teoli, Sheppy, ziyunfei, kitchin, Nickolay, Dria
Last updated by: fscholz,