Programming i html: Combine a:visited with a:after, or chaining pseudo-classes w/psuedo-elements on newest questions tagged html – Stack Overflow

Let’s say I wanted to add a shape (like a checkmark) next to a link after it has been visited, instead of having it just turn purple, using a:after along with a:visited.

I’m unsure if I should select the shape like this:

a:visited:after {

or like this:

a:visited a:after


a:visited :after {

(i’m also a bit fuzzy on when I should or shouldn’t add a space before a pseudo-element, or does it even matter?)

or perhaps something different?

Right now my css looks like this:

a:visited:after {
    /* check mark shape */
    color: black;
    position: relative;
    width: 3px;
    height: 6px;
    border: solid black;
    border-width: 0 2px 2px 0;  
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -o-transform: rotate(45deg);

check mark shape code from

Thanks for any help.

See Answers

Programming i html: programming-i-html

online applications demo