Latest web development tutorials
 

The CSSStyleDeclaration Object


CSSStyleDeclaration Object

The CSSStyleDeclaration object represents a collection of CSS property-value pairs.


CSSStyleDeclaration Object Properties

Property Description
cssText Returns a text representation of the declaration block
length Returns the number of properties
parentRule Returns the containing CssRule

CSSStyleDeclaration Object Methods

Method Description
getPropertyPriority(property) Gets whether or not the property has the "important" priority
getPropertyValue(property) Gets the property value
item(index) Gets the property name
removeProperty(property) Gets the removed property value
setProperty(property, value, priority) Set a CSS property for an element