What is a stylesheet?

“Your stylesheet should declare a red-text class and have its color set to red.” i can’t pass this challenge, what’s my mistake? please help, stuck for 24 hours

  h2 {
    color: red;

<h2 class="red-text">CatPhotoApp</h2>

<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36.

Link to the challenge:

Normally a stylesheet is a separate CSS file dedicated only to style properties (to answer your question), but in this challenge and the others in the sequence you’re actually doing the stylesheet in the html file: it’s what you have in between the tags.

So you have correctly added the red-text class to your h2 in the body, but they want you to style .red-text in the style section. You’re styling the h2 which is functionally the same, but not what the challenge is asking for.

1 Like