In this example, what color will Paragraph 1 be?

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest

p:first-of-type {
color: red;
}
p {
color: blue;
}
.container {
color: yellow;
}
p:first-child {
color: green;
}
<div class=”container”>
<h1>Heading</h1>
<p>Paragraph1</p>
<p>Paragraph2</p>
</div>

  • blue
  • green
  • red
  • yellow
0/5 (0 Reviews)

Like this article?

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest

Related Posts