Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Optimizing the HTML Code : Page 4

You can do some simple things with your HTML tags to make graphics feel faster and work better for all readers.


advertisement

Don't Resize the Image
Use the image at its actual size.

Yes, you can use the width and height image tag attributes to shrink or enlarge an image on-the-fly, but all that does is add processing time for your readers.

Instead, use the image at the size you have saved it in your graphics program. And if you need to use it at a different size, resize it with your image editing tool.

Original size = 252 x 144 pixels
IMG attributes width="252" height="144"
File size = 10.1K
Original size = 252 x 144 pixels
IMG attributes width="121" height="69"
File size = 10.1K
Image had to download, then the browser needed to resize it.
Original size = 121 x 69 pixels
IMG attributes width="121" height="69"
File size = 3.3K
Smaller file, faster download and no resizing.




Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date