Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

Pseudo-class

In CSS, a pseudo-class selector targets elements depending on their state rather than on information from the document tree. For example, the selector a:visited applies styles only to links that the user has already followed.

Learn more

Technical reference

Document Tags and Contributors

 Contributors to this page: VictorAbdon, JuliaM, klez, Andrew_Pfeiffer
 Last updated by: VictorAbdon,