:nth-of-type(n)

Term side of the Card
Topic: Pseudo Classes
Unit title: :nth-of-type(n)
Categories: Pseudo-class
Explanation side of the Card

Explanation: The pseudo-class that selects elements based on their position among siblings of the same type. It applies styles to elements that match the specified pattern, such as every second ('2n') `<p>` tag, allowing for precise control over elements of a certain type within their parent.

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: