Assessment request for Selectors Skill Test 1

Hi. Any Assessment appreciated. Thank you and have a great day!

Selectors One
Selectors Two
Selectors Three
Selectors Four
Selectors Five

Hi @harryghgim!

Let’s go through these assessment answers:

Selectors 1: This is perfect, well done!

Selectors 2: This is also perfect; well done again!

Selectors 3: This is pretty much perfect. One tip here — for the first child rules, you could change it to this to make it so the .container's first child is selected, even if it is not a paragraph:

.container > :first-child {
    font-size: 150%;
}
.container > :first-child::first-line {
  color: red;
}

What you’ve written is basically saying "select any element that is a first child, anywhere inside .container, as long as it is a <p>". For amusement value, try removing the > combinators from inside my suggestion and trying it — it will select anything that is a first child, anywhere inside the hierarchy!

Selectors four: Perfect again, well done!

Selectors five: And perfect again!

Great work here, well done indeed.

1 Like