Next-Gen App & Browser
Testing Cloud

Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Next-Gen App & Browser Testing Cloud

How to make an image smaller in HTML?

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 website on 3000+ browsers

Get 100 minutes of automation test minutes FREE!!

Test Now...

KaneAI - Testing Assistant

World’s first AI-Native E2E testing agent.

...
ShadowLT Logo

Start your journey with LambdaTest

Get 100 minutes of automation test minutes FREE!!

Signup for free