:first-of-type

Term side of the Card
Topic: Pseudo Classes
Unit title: :first-of-type
Categories: Pseudo-class
Explanation side of the Card

Explanation: The pseudo-class that targets the first element of its type within a parent, such as the first paragraph or first image. It's useful for styling the first occurrence of a specific element differently from others of the same type in a container.

Browser compatibility:
  • The chrome browser supports this feature starting from version 1
  • The edge browser supports this feature starting from version 12
  • The firefox browser supports this feature starting from version 3.5
  • The safari browser supports this feature starting from version 3.1
Availability: