In the original the states already had IDs (except, for some reason, Virginia), so it was simply a matter of moving the inline styling to a CSS section at the top.
The CSS can also be in a different file, which could be dynamically generated for different users if you wanted to build a simple "make a pretty map of which states you've visisted" app.