Specifies style characteristics of HTML elements.
Platform Support
| IE | Mozilla | Netscape | Opera | Safari | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|---|
Constructors
| Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | ||
|---|---|---|---|---|---|---|---|---|
|
Style Constructor() : Style
Creates a new instance of a Style object.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ | ||
Style() : StyleCreates a new instance of a Style object. Returns
|
||||||||
Properties
| Property | Action | IE | Mozilla | Netscape | Opera | Safari |
|---|---|---|---|---|---|---|
|
cssText
: String
CSS definition for the style.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
media
: String
Represents the "media" attribute of the "style" element. Set to "screen", "print," or "all".
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
parentRule
: CSSRule
Reference to the parent CSSRule.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
type
: String
Represents the "type" attribute of the "style" element. Set to "text/css" for CSS.
|
Show Details | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
References
HTMLElement.style|CSSStyleDeclaration|CSS2Properties
Availability
W3C
