A pseudo-class is used to define a special state of an element.
Syntax:-
selector:pseudo-class { property:value; }
Ex: –
div:hover { background-color: red;}
Pseudo-classes–
- :link
- :visited
- :hover
- :active
- :focus
- :checked
- :first-child
- :first-of-type
- :nth-child(n)


Latest posts by rajeshkumar (see all)
- The Three Pillars of Digital Resilience in 2025: Database Administration, Cybersecurity, and Vulnerability Assessment - September 24, 2025
- Avionics Technician: The Backbone of Modern Aviation - September 12, 2025
- Top 20 Computer Vision Libraries - August 26, 2025