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

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
styleChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support 4.4Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?


Full support  
Full support
Compatibility unknown  
Compatibility unknown

Document Tags and Contributors

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