In the following example, according to cascading and specificity rules, what color will the link be?

Advertisement

.example {
color: yellow;
}
ul li a {
color: blue;
}
ul a {
color: green;
}
a {
color: red;
}
<ul>
<li><a href=”#” class=”example”>link</a></li>
<li>list item</li>
<li>list item</li>
</ul>

  • green
  • yellow
  • blue
  • red
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment


Share via
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend