// inside the STYLE element: classes.style1.H2.color = "red"; ids.A1.color = "blue"; // elements in the BODY: <H2 CLASS="style1">default H2</H2> <H2 CLASS="style1" ID="A1"> This one is blue ...</H2>