Skip to main content

String Property Type

String properties hold text values, such as a font family, text alignment or a color written as a CSS color string. Examples include fontFamily, fontWeight, textAlign, textTransform and strokeLinecap.

The full list of String properties and the elements that support them is on the All Properties page.

Action example
textElement.style.fontFamily.value = "Roboto";