Answers for "what is the difference between first-child and first-of-type in css"

1

difference between first of type and first child

<div class="parent">
  <h1>Child</h1>   <!-- h1:first-child, h1:first-of-type -->
  <div>Child</div> <!-- div:nth-child(2), div:first-of-type -->
  <div>Child</div>
  <div>Child</div>
</div>
Posted by: Guest on March-15-2021

Code answers related to "what is the difference between first-child and first-of-type in css"

Browse Popular Code Answers by Language