Adds the given style to the element, either by adding a style rule to the 'css' placeholder or by ading an inline style attribute.

Syntax

Smartsite SXML CopyCode image Copy Code
string html.style(string elementId, string cssText)

Parameters

Name Data Type Description
elementId String The element id.
cssText String The CSS text.

Return Value

Data Type Description
String Inline style attribute (if the 'css' placeholder does not exist) or an empty string.

Expand image Example

SXML