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 AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
styleChrome Full support 1Edge Full support 12Firefox Full support YesIE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support 37Chrome Android Full support 18Edge Mobile Full support YesFirefox Android Full support YesOpera 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,