CSS StyleDeclaration cssText Property (original) (raw)

Last Updated : 9 Jun, 2023

The cssText property is used to set or return the value of an inline style declaration of an element.

Syntax:

element.style.cssText

element.style.cssText = style

Property value:

Return Value: It returns the inline style of the element in the form of string.

Example 1: To get the cssText property:

html `

CSS StyleDeclaration cssText Property