but this line would not make the font color to be red just a little modification and it would work
.container p:first-child:first-line
another way to achive that useing .container > *:first-child:first-line so it be more generic despite what is the fist child element is it would work for it
first i miss type that :first-line it should be ::first-line sorry for that
and you welcome and yes it fine just add the extra : that i missed
for this
.container:first-line { color: red; }
it mean go to the class container which it the div element in our case here then set the color of it’s first line to red which would not color anything to get better understand of this try to add any word after the opening of the div element like bellow
<div class="container">
this will be red
<p>Veggies es
and if you change it to .container p::first-line { color: red; } it will make the first line for both p element to be red
try this also .container ::first-line { color: red; } and notice how it get even away from our requirement “there space between container and :”