CSS Pseudo Classes Cheatsheet

Balaji Ashok Kumar
2 min readNov 21, 2018

--

CSS Pseudo Classes

What is Pseudo Class?

Pseudo-classes in CSS are something you’ve probably used, even if you didn’t know it. Some of the most popular pseudo-classes are ‘:hover’, ‘:active’.

In general terms, a pseudo-class is sort of a phantom state or a specific characteristic of an element that we can target with CSS.

Pseudo-classes allow you to apply styles to an element based on its state, its interaction with the user, or its position in the document. Single colon is the syntax for pseudo classes.

For example, it can be used to:

· Style an element when a user mouses over it

· Style visited and unvisited links differently

· Style an element when it gets focus

Pseudo Classes Cheatsheet

I have prepared a cheat sheet of CSS Pseudo Classes for quick reference along with examples and explanations for each of them.

CSS Pseudo Classes Cheatsheet

You can download it in a pdf format also from below link.

https://github.com/dynamicbalaji/bk-cheatsheets/blob/master/CSS%20Pseudo%20Classes.pdf

Like this?

Hit the clap button 👏👏🏻👏🏼👏🏽👏🏾👏🏿 (as many times as you want!) :)

Please feel free to share your feedback and I would very much welcome it :) Thanks for reading. Have a nice day!!!

References

--

--