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="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
and change it to
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" 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>
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="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">
to
<img class="small-image" src="https://bit.ly/fcc-relaxing-cat" 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.