Pseudo Classes

Pseudo classes function similarly to pseudo elements; however, pseudo classes do not need to be linked to a specific physical element. For example, if you wanted to use the pseudo class to make all the links in your document bold and 14 point, you could use the following:

:link {font-style: bold; font-size: 14pt} 

The pseudo classes function similarly to the pseudo elements; however, they do not need to be linked to real elements in order to be used in a style sheet.

  • :link— The :link pseudo class refers to all hypertext links in the document.

  • :visited— The :visited pseudo class refers to all hypertext links in the document which have already been visited by the user.

  • :active— The :active pseudo class refers to the hypertext link ...

Get Special Edition Using XML, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.