To resize the img

I have tried all the possible means to resize the img with 100px and am still getting it wrong. <img class= “smaller-image” width= 100px" src=“https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg” alt=“A cute orange cat lying on its back” >
the cat picture have been reduce to 100px but still marking me wrong
Can you show me where the mistake is

  **Your code so far**

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
  color: red;
}

h2 {
  font-family: Lobster, monospace;
}
p {
  font-size: 16px;
  font-family: monospace;
}
</style>
<h2 class="red-text">CatPhotoApp</h2>
<main>
<p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
<a href="#"><img class= "smaller-image" width= 100px" src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back" ></a>
<div>
  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
</div>

<form action="https://freecatphotoapp.com/submit-cat-photo">
  <label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
  <label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
  <label><input type="checkbox" name="personality" checked> Loving</label>
  <label><input type="checkbox" name="personality"> Lazy</label>
  <label><input type="checkbox" name="personality"> Energetic</label><br>
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>
</main>
  **Your browser information:**

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

Challenge: Size Your Images

Link to the challenge:

Hi @odaniboy !

Welcome to the forum!

In the style tags, you need to add the smaller-image class with a width of 100px.

What do the failing tests say? It doesn’t look like a class with the name smaller-image has been defined with a width property.

The test says, " Your image should be 100 pixels wide"

Meaning I have create a new style tag or I have to add the class smaller-img and 100px to previous style tag

There should only be one style section.

1 Like

You don’t need to create a new style tag.

<style>
.red-text {
  color: red;
}

h2 {
  font-family: Lobster, monospace;
}
p {
  font-size: 16px;
  font-family: monospace;
}
ADD CODE HERE
</style>

As a side note: for inline styles make sure to have quotes in the beginning and end.

This is incorrect.

width= 100px"

This is correct

style="width:100px;"

You can get rid of that inline width for this challenge.
But it is good to know for the future.

I have input style=“width:100px;” still the test came out “wrong”

I think you misunderstood my last post.

I was just showing you how to write an inline style because you had a syntax error.

But for this lesson, you are supposed to add your code inside the style tags.

class name goes here {
width:pixels goes here;
}

Just to be clear you can delete this

Just add the code inside the style tags, following the structure I laid out but with the actual values.

Hope that makes sense now

Thnx I have done it . Thanx very much