hey Amritpal Singh, I see that you are missing the border that indicates the selected image, here is a solution so that you can lower the opacity and still have the border visible.
1- you should wrap the img in a div . For the div the border style is applied and in the child img the opacity is lowered and thus does not affect the visibility of the border. HTML
<div class="container-img">
<img src="https://http2.mlstatic.com/D_NQ_NP_658639-CBT50339432941_062022-W.jpg">
</div>
CSS
div.container-img{
display: block;
width:300px;
height: 300px;
border: 6px solid black;
}
.container-img img{
width: 100%;
height: 100%;
opacity: 0.4;
}
happy coding👍🏻🔥💯