Typography: class instead of pseudo-selector?

Exercise: Typography

I believe the instruction of changing the line height of the first letter in the journal section is there for us to use the :first-letter pseudo-selector, however, the html uses a span tag with a class called called first-letter. This is confusing. I tried using the pseudo-selector instead, but it somehow did not work.
.journal:first-letter {
line-height: 0.87;
color: yellow;
}

The color of ‘I’, the first letter in that section, did not change,

The ::first-letter pseudo selector only works on a text node. If you apply the pseudo selector on a class of a tag which has an image as its first child, it won’t work.

1 Like