Web features explorer

CSS object model

Widely available
Tags: api Groups: CSS > CSS object models

The CSS object model API reads, creates, and modifies CSS stylesheets and inline styles. Also known as CSSOM. To learn more, see CSS, CSSConditionRule, CSSConditionRule: conditionText property, CSSGroupingRule, CSSGroupingRule: cssRules property, CSSGroupingRule: deleteRule() method, CSSGroupingRule: insertRule() method, CSSMediaRule, CSSMediaRule: media property, CSSPageDescriptors, CSSPageRule, CSSPageRule: selectorText property, CSSPageRule: style property, CSSPseudoElement, CSSPseudoElement: element property, CSSPseudoElement: type property, CSSRule, CSSRule: cssText property, CSSRule: parentRule property, CSSRule: parentStyleSheet property, CSSRuleList, CSSRuleList: item() method, CSSRuleList: length property, CSSStyleDeclaration, CSSStyleDeclaration: cssFloat property, CSSStyleDeclaration: cssText property, CSSStyleDeclaration: getPropertyPriority() method, CSSStyleDeclaration: getPropertyValue() method, CSSStyleDeclaration: item() method, CSSStyleDeclaration: length property, CSSStyleDeclaration: parentRule property, CSSStyleDeclaration: removeProperty() method, CSSStyleDeclaration: setProperty() method, CSSStyleRule, CSSStyleRule: selectorText property, CSSStyleRule: style property, CSSStyleSheet, CSSStyleSheet: cssRules property, CSSStyleSheet: deleteRule() method, CSSStyleSheet: insertRule() method, CSSStyleSheet: ownerRule property, Document: styleSheets property, HTMLElement: style property, HTMLLinkElement: sheet property, HTMLStyleElement: sheet property, MediaList, MediaList: appendMedium() method, MediaList: deleteMedium() method, MediaList: item() method, MediaList: length property, MediaList: mediaText property, ProcessingInstruction: sheet property, ShadowRoot: styleSheets property, StyleSheet, StyleSheet: disabled property, StyleSheet: href property, StyleSheet: media property, StyleSheet: ownerNode property, StyleSheet: parentStyleSheet property, StyleSheet: title property, StyleSheet: type property, StyleSheetList, StyleSheetList: item() method, StyleSheetList: length property at MDN.

Compatibility