I came across the following CSS code snippet:
a {
display:table;
}
a:hover {
text-decoration:none;
}
a:first-child {
color:#00FF00; /* green */
}
a:nth-child(3) {
color:#FF0000; /* red */
}
<a href="www.google.com">Google<a>
<a href="www.google.com">Google<a>
<a href="www.google.com">Google<a>
Question: I noticed that the second "Google" is red while the third one is not. Can someone explain why this is happening?