Setting properties from JavaScript

All of the CSS properties can be set from JavaScript using the HTML Document Object Model (DOM).

Properties can be set by tag, class, or ID using JavaScript's document.tags, document.classes, and document.ids objects.

The following pages show examples; see the online reference documentation for full details.

tags.P.borderWidths("10px"); tags.H2.borderStyle="solid" tags.H2.borderColor="blue"; tags.BODY.backgroundColor = "yellow"; tags.H2.color = "red"; tags.P.fontStyle = "italic"; classes.Pnormal.all.fontWeight = "normal"; classes.Pbold.all.fontWeight = "bold"; fontSize = "16pt" fontSize="xx-large" fontSize="smaller" tags.H2.fontFamily = "Helvetica, Arial, sans-serif"; tags.H2.textDecoration = "underline"; tags.H3.textTransform = "uppercase"; tags.H4.textAlign = "center"; tags.P.textIndent = "5em"; listStyleType = square listStyleType = upper-roman