Quantcast
Channel: is it possible to decide height and width of a image? - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Answer by Jukka K. Korpela for is it possible to decide height and width of a image?

$
0
0

Yes, you can use the height and width attributes, e.g. <img src=logo.gif alt=ACME width=50 height=20>. You can also set the height and width properties in CSS.

When the width or height differs from the dimensions of the image itself, browsers rescale the image.

However, it is almost always better to scale the image in your favorite image processing program. Scaling down a large image that way lets you control the quality of the result, and it also saves bandwidth (and processing time in browsers).


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>