First you should a CSS selector named responsive-img. How to do that? →
css selector {
property: value;
}
What is a CSS selector? Let’s say i want to style all my p elements inside my document, i can write a code like this.
p {
color: red;
}
--> p is the CSS selector.
--> color is the property.
--> red is the value.
This will change the all p elements’ text color to red innside my page.
Direct solution to your problem →
<style>
.responsive-img { --> CSS selector is a class name here which we defined inside the <img> tag
max-width: 100%;
display: block;
height: auto;
}
</style>
<img class="responsive-img" src="https://s3.amazonaws.com/freecodecamp/FCCStickerPack.jpg" alt="freeCodeCamp stickers set">
<img src="https://s3.amazonaws.com/freecodecamp/FCCStickerPack.jpg" alt="freeCodeCamp stickers set">