Important Notice:

Course Content
Float Property
0/1
Z-Index
0/1
CSS object-fit Property
0/1
CSS Visibility Property
0/1
CSS (Chapter 4) M2-R5.1
About Lesson

:first-of-type

      यह pseudo class किसी particular type के ऐसे element को target करती है जो अपने parent element का first child element होता है।

:first-of-type

      This pseudo class targets an element of a particular type that is the first child element of its parent element.

Example:

 

<html>

<head>

<style>

p:first-of-type

{  

background-color:silver;

}

</style>

</head>

<body>

<div>

<span>This is first span</span>

<p>This will be targeted</p>

<p>This will no be targeted</p>

</div>

</body>

</html>

 

error: Content is protected !!