What are Pseudo Classes in CSS?
Pseudo Classes in CSS are special keywords used with a selector to define a special state of a selected element. Pseudo Classes are mainly used to add special effects to selectors. Most Pseudo Classes follows the same structure, In other words, Pseudo Classes are placed right after a selector or element followed by single colon or double colon. There are many pseudo-classes in css, but here are some most commonly used pseudo-classes.
1 hover
2 active
3 link
4 focus
5 active
Let's understand pseudo-classes using an example.
Here we will use the hover pseudo-class, Hover adds special effects to an element when the user moves the cursor over the specified element.