1

What is the difference between these two CSS entries:

a.special {
    color: #296596;
    font-family: "Georgia";
}

and

.special a {
    color: #296596;
    font-family: "Georgia";
}

1 Answer 1

5
  • a.special targets an a element with the class special on itself.
  • .special a targets an a element somewhere at any depth within an element that has the class special.

This is very basic knowledge, I would recommend starting with a tutorial on the subject.

Not the answer you're looking for? Browse other questions tagged or ask your own question.