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:
- It is used to return the cssText property.
element.style.cssText
- It is also used to set the cssText property.
element.style.cssText = style
Property value:
- style: It is a string literal that specifies the style to be added to the element.
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