Quick question about specifying the size of images in pixels:
<img src="/logo.jpg" alt="logo" width="200px" height="120px" />
or
<img src="/logo.jpg" alt="logo" width="200" height="120" />
I've been always putting in the px but recently noticed that very few people do this. Am I better off leaving that out? Does it matter one way or the other?
Use css to consider the the size of the image:
CSS:
.logo {
width: 200px;
height: 120px;
}
HTML:
<img src="/logo.jpg" alt="logo" class="logo" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With