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
Correct Answer:
- red