How about something like this:
<a href="some-visited-url">
<span class="test"></span>
</a>
Does the CSS for span.test change if the link is visited or not?Also, this will be very awkward when the style you see with your eyes is not the style that is given to JavaScript.