CSS doubts

Hello all!
I am stuck in one of the CSS codes where I want my anchor tag to be black when non-visited but want to turn it into red if it is visited. could you please suggest a soln or find the error in my codes? Here is the link to the codes.


I don’t know any better place to ask these doubts. If there is any good place to ask, please suggest me! Thanks in advance!