Style : Object

Specifies style characteristics of HTML elements.

Browser/User Agent Support

IEMozillaNetscapeOperaSafari
4.0+1.0+6.0+7.0+1.0+

Constructors

ConstructorIEMozillaNetscapeOperaSafari
Creates a new instance of a Style object.
4.0+1.0+6.0+7.0+1.0+
 

Properties

PropertyIEMozillaNetscapeOperaSafari
CSS definition for the style.
4.0+1.0+6.0+7.0+1.0+
 
Represents the "media" attribute of the "style" element. Set to "screen", "print," or "all".
4.0+1.0+6.0+7.0+1.0+
 
Reference to the parent CSSRule.
4.0+1.0+6.0+7.0+1.0+
 
Represents the "type" attribute of the "style" element. Set to "text/css" for CSS.
4.0+1.0+6.0+7.0+1.0+
 

References

HTMLElement.style | CSSStyleDeclaration | CSS2Properties

Availability

W3C

Constructor Detail

Style Style()

Creates a new instance of a Style object.

Visibility
internal

Property Detail

String cssText

CSS definition for the style.

Availability

HTML DOM Level 2

String media

Represents the "media" attribute of the "style" element. Set to "screen", "print," or "all".

Availability

W3C

CSSRule parentRule

Reference to the parent CSSRule.

Availability

HTML DOM Level 2

String type

Represents the "type" attribute of the "style" element. Set to "text/css" for CSS.

Availability

W3C