Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

css

What is the first of type selector in CSS?

Educative Answers Team

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

​The :first-of-type selector is used to target the first child occurrence of every element of its parent. The first child of that particular element will adopt all of the properties.


Syntax

The syntax for the :first-of-type selector given below:

svg viewer

Examples

The code examples below show how the :first-of-type selector is used to manipulate the formatting properties that follow:

RELATED TAGS

css
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring