Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Style listStyleImage Property

Style cssText Property

Style Object Reference The Style object


Definition and Usage

The cssText property sets or returns the content of a style declaration as a string.

Syntax

Set the cssText attribute:

Object.style.cssText="

string

"

Return the cssText attribute:

Object.style.cssText

Value Description
string Specifies the content of a style declaration.

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the cssText property.


Example

Example

Get a style declaration as a string:

This is a paragraph.


Try it »


Style Object Reference The Style object