Specifies style characteristics of HTML elements.
Browser/User Agent Support
| IE | Mozilla | Netscape | Opera | Safari | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|---|
Constructors
| Constructor | IE | Mozilla | Netscape | Opera | Safari |
|---|---|---|---|---|---|
Creates a new instance of a Style object. | 4.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
Properties
| Property | IE | Mozilla | Netscape | Opera | Safari |
|---|---|---|---|---|---|
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
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
