Mozilla Explorer



The CSSStyleDeclaration interface represents an object that is a CSS declaration block, and exposes style information and various style-related methods and properties.

Mozilla Firefox is a feature-rich and highly customizable web browser that’s user-friendly enough for beginners and sophisticated enough for advanced users. Cns menu. Firefox has managed to retain significant market share despite stiff competition from Google Chrome and Microsoft Internet Explorer and Edge. Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation. Portions of this content are ©1998–2021 by individual mozilla.org contributors. Content available under. Download Mozilla Firefox, a free web browser. Firefox is created by a global not-for-profit dedicated to putting individuals in control online. Get Firefox for Windows, macOS, Linux, Android and iOS today!

A CSSStyleDeclaration object can be exposed using three different APIs:

  • Via ElementCSSInlineStyle.style, which deals with the inline styles of a single element (e.g., <div>).
  • Via the CSSStyleSheet API. For example, document.styleSheets[0].cssRules[0].style returns a CSSStyleDeclaration object on the first CSS rule in the document's first stylesheet.
  • Via Window.getComputedStyle(), which exposes the CSSStyleDeclaration object as a read-only interface.

Attributes

CSSStyleDeclaration.cssText
Textual representation of the declaration block. Setting this attribute changes the style.
CSSStyleDeclaration.lengthRead only
The number of properties. See the item() method below.
CSSStyleDeclaration.parentRuleRead only
The containing CSSRule.

CSS Properties

CSSStyleDeclaration.cssFloat
Special alias for the float CSS property.
CSSStyleDeclaration named properties
Dashed and camel-cased attributes for all supported CSS properties.

Methods

Mozilla Explorer Chrome

CSSStyleDeclaration.getPropertyPriority()
Returns the optional priority, 'important'.
CSSStyleDeclaration.getPropertyValue()
Returns the property value given a property name.
CSSStyleDeclaration.item()
Returns a CSS property name by its index, or the empty string if the index is out-of-bounds.
An alternative to accessing nodeList[i] (which instead returns undefined when i is out-of-bounds). This is mostly useful for non-JavaScript DOM implementations.
CSSStyleDeclaration.removeProperty()
Removes a property from the CSS declaration block.
CSSStyleDeclaration.setProperty()
Modifies an existing CSS property or creates a new CSS property in the declaration block.
CSSStyleDeclaration.getPropertyCSSValue()
Only supported via getComputedStyle in Firefox. Returns the property value as a CSSPrimitiveValue or null for shorthand properties.

Example

Specifications

SpecificationStatusComment
CSS Object Model (CSSOM)
The definition of 'CSSStyleDeclaration' in that specification.
Working DraftMerged the DOM Level 2 StyleCSS2Properties interface into CSSStyleDeclaration.
Document Object Model (DOM) Level 2 Style Specification
The definition of 'CSSStyleDeclaration' in that specification.
ObsoleteInitial definition

Browser compatibility

BCD tables only load in the browser

See also

The HTML <figcaption> or Figure Caption element represents a caption or legend describing the rest of the contents of its parent <figure> element.

Content categoriesNone.
Permitted contentFlow content.
Tag omissionNone, both the starting and ending tag are mandatory.
Permitted parentsA <figure> element; the <figcaption> element must be its first or last child.
Implicit ARIA roleNo corresponding role
Permitted ARIA rolesgroup, none, presentation
DOM interfaceHTMLElement

Attributes

Examples

Please see the <figure> page for examples on <figcaption>.

Mozilla explorer downloadsMozilla explorer firefox

Specifications

Mozilla Explorer 8 Free Download

SpecificationStatusComment
HTML Living Standard
The definition of '<figcaption>' in that specification.
Living Standard
HTML5
The definition of '<figcaption>' in that specification.
Recommendation

Mozilla Explorer

Browser compatibility

BCD tables only load in the browser

See also

This firefox download page

Mozilla Keyword Explorer

  • The <figure> element.