I have learned most coding through trial and error. The hover tag seemed more important to me, so I put it before the visited tag. I couldn't figure out why my hover state wasn't working. My hover state wasn't working, because the visited state was overriding it. Remember that CSS "cascades". An anchor tag can be both in a visited state and a hover state. Since you want the hover color to override the visited color, you place it after the visited state.