Writing CSS style data to a page via ethernet shield

What does your serial output look like?

Code like this:

            digitalWrite(LightA, HIGH);
            LightAState = HIGH;

            digitalWrite(LightA, LOW);
            LightAState = LOW;

Is way too easy to get out of sync. Sooner or later, you'll change one line but not the other.

Code like this:

            LightAState = HIGH;
            digitalWrite(LightA, LightAState);

            LightAState = LOW;
            digitalWrite(LightA, LightAState);

is impossible to get out of sync.

Food for thought.