To make an image smaller in HTML, you can use the “width” and “height” attributes with the values in pixels inside the <img> tag.
Following is the HTML code to make an image having a width of 200 pixels and a height of 80 pixels.
<img src="my_file.png" width="200" height="90">
However, you can also use CSS to make the image smaller. For CSS, it’s recommended to use “width” and “height” properties.
<img src="my_file.png" style="width: 200px; height: 90px;">
Test your websites, web-apps, or mobile apps seamlessly with LambdaTest.
Start Free TestingEarn resume-worthy Selenium certifications that help you land a top job.
Learn MoreTest orchestration and execution cloud of 3000+ browsers and OS
24/7 support
Enterprise grade security
Fastest test execution cloud