Pseudo class


#1



https://www.codecademy.com/en/courses/learn-sass/lessons/mixins-and-parent-selector/exercises/parent-selector?action=lesson_resume&link_content_target=interstitial_lesson


In the course Learn HTML and CSS, I did not learn about pseudo class. Could someone please clarify what a pseudo class is?



#2

I'll explain it with an example,

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

That :hover right there is the pseudo class. It's added to your a.

In this case it's used to define the state of the a element when you hover your mouse over it.

So the CSS syntax is:

selector:pseudo-class {
    property:value;
}

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.