Sizing My Image

Tell us what’s happening:
I added a class to my HTML element. Is there something wrong with Google Chrome?

Your code so far

<link href="" rel="stylesheet" type="text/css">
  .red-text {
    color: red;

  h2 {
    font-family: Lobster, monospace;

  p {
    font-size: 16px;
    font-family: monospace;
 <h2 class ="smaller image">CatPhotoApp</h2> {
    width: 100px

<h2 class="red-text">CatPhotoApp</h2>
  <p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>
  <a href="#"><img src="" alt="A cute orange cat lying on its back."></a>
    <p>Things cats love:</p>
      <li>cat nip</li>
      <li>laser pointers</li>
    <p>Top 3 things cats hate:</p>
      <li>flea treatment</li>
      <li>other cats</li>
  <form action="/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>

Your browser information:

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

Link to the challenge:

First, you need to define smaller-image class inside your style tags.

Then apply it to your h2 element with correct spelling.

1 Like

Could you please show me an example?

You add this to your style:

.smaller-image {
          width: 100px;

And modify your HTML code to look like this:

 <h2 class ="smaller-image">CatPhotoApp</h2> 

Please note that you cannot define classes outside of CSS or tag and also, be extra careful with the typing and naming. smaller image is VERY different from smaller-image when it comes to computer code.

Thank you for the example, for it’s easy to forget how to do certain lines of code. I followed your code to a T, but I still can’t get past this part. My browser zoom is at 100%. What else should I do?

You need to add that class to the image, not to the H2 tag.

h1 - h6 are for text.

Create this class in your style tags

.smaller-image {
width: 100px;

Go to your
<a href="#"><img src="" alt="A cute orange cat lying on its back."></a>

and change it to

<a href="#"><img src="" class="smaller-image" alt="A cute orange cat lying on its back."></a>

You have to create the class inside the <style></style> tags. The class then needs to be added to the element you wish to modify, in this case the <img> and not to the <h2></h2>

Hope it helps,

I can not pass this too, I can not understand what @WaterlooPitt try to say, It’s so complex

Nvm, i passed it. Thank you

Style element recognizes CSS code.
You should not put this line in your style element

<h2 class ="smaller image">CatPhotoApp</h2> {
    width: 100px

instead change it to

.small-image {
   width: 100px

because this line of code: <h2 class ="smaller image">CatPhotoApp</h2> is HTML code not CSS code.
In order to pass you have to add a class name to your image element and name it small-image.
Change this part of your HTML code:

<img src="" alt="A cute orange cat lying on its back.">


<img class="small-image" src="" alt="A cute orange cat lying on its back.">

By naming your img element small-image, your CSS style on top should be able to resize your image.


Sizing My Image ← This is the explanation about what’s wrong with the original question.

You can’t write HTML inside a style element. You have to write in CSS inside the <style> tag and use

  • selectors like .small-image for classes and #title-div for id's.
  • pseudo-selectors like :hover.