Is there any reason to specify an image's height and width on the
img tag rather than (or in addition to) specifying in the CSS?
Setting and image's width and height in the HTML code, reserves the
space for that element before image gets loaded. I don't think there is
any other advantage, and I rarely ever set image width/height in the
HTML code.
I don't set images' width/height in CSS either, other than as general
and standard-classes for max-width to make images play nice with my layouts.
Could specifying the width and height only in the CSS be a reason
that an image might load more slowly (in modern browsers)?
If one specify varying dimensions for loads of images in CSS everything
may slow down somewhat simply because of large CSS.
I haven't notices such slow-down for my own work since I don't set
dimensions anywhere. Have an example?
regards
Georg
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/