I wrote a code in Learn section but it server says that it's wrong! Can you check my code?

Hello coders! I need your help
I wrote an HTML and CSS code but server says that it is incorrect. Can you help?

  .red-text {
    color: red;

  h2 {
    font-family: Lobster, monospace;

  p {
    font-size: 16px;
    font-family: monospace;

  .smaller-image {
    width: 100px;
  .thin-green-border {
    border-color: green;
    border-width:  10px;
    border-style: solid;

<h2 class="red-text">CatPhotoApp</h2>
  <p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>

  <a href="#"><img class="thin-green-border" class="smaller-image" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>

Can you link the challenge? Is that your full code? If it is, then you forgot to close your <main> tag. It is opened but not closed anywhere

It’s closed. It should be alright

Look at what the challenge asks you to do, and what it says you did wrong.

Yes but my code is correct why it’s saying so?

Well, does your <img> element have a class of smaller-image. Here’s an example hint.

<img class="your-class">

You didn’t give the full code. So it is harder to evaluate

1 Like

what should I write instead of “your”

Well, look at what the challenge asks you to put it as. Look at the first one.

1 Like

Thank you, I wrote
<img class=“smaller-image” “thick-green-border”
instead of
<img class=“smaller-image thick-green-border”
because of this my code was incorrect


This one is CORRECT

1 Like