:visited applies when the target link (the href attribute in the <a> tag) is in the browser's history. If you're in private browsing mode, or the link isn't in the history, then it won't apply. It could also be a css priority issue: https://www.w3schools.com/css/css_specificity.asp (the order that the rules get applied in).
The parent page can also override some styles. You could prove if the visited state is working by removing all styling, observing that it's Blue, then visiting it, and observing that it's Purple (these are the defaults, for most browsers). If that's working, then you should be able to test your custom style. I'm happy to answer more questions about this: HTML can be fun to work with!