I've learnt from somewhere a long time ago that specifying width and height for <img>
elements in an HTML document speeds up and improves the page loading experience, and have generally kept to this practice:
<img src="" width="100" height="100" />
I'm now faced with a situation where I have a very large number of images on a single page, and I'd prefer to set the dimensions via CSS for both easier control and less repetitive HTML code:
.whatever img {width: 100px; height: 100px;}
Although this isn't a hugely serious issue, I'm wondering whether declaring the dimensions in CSS will have the same benefits as declaring the dimensions in HTML, or whether it ought to just be done in HTML directly?
Any insight would be welcome.
Thanks