On Fri, 4 Jun 2004 21:19:53 +0000 (UTC), Ana <me@here.edu> wrote:
I just ran a report on a site I'm redesigning and came up with all these
missing height/width tags.
That's good - there's no such thing as a "height tag".
What was the site URL, and what was the "report generator" ? (for it
wasn't a validator)
Assuming you mean width and height attributes on <img> elements, then
they have their uses but they're never essential. If the images are
available and the attributes are omitted, then the size of the image
itself will be used.
Their main usefulness is that they cause the page layout to be the
same as intended, even if the images fail or deliberately aren't
loaded. In some cases (mainly an issue from a few years ago), they can
improve page rendering speed and behaviour - rather than the page
re-flowing itself as images finally appear (and their size becomes
known), then the page lays itself out around the attribute values,
then fills in the blanks.
It's useful to omit them if the images are dynamic (i.e.
unpredictable) and you simply don't know their final size.
It's OK to only use one of them. Sometimes, espeically with thumbnails
of varying proportions, you might know one dimension to be the same
for all images, but the other varies.
You can also use them for "dumbnails" . These are like thumbnails, but
done by setting both attributes to be half or a quarter of the image's
value (less rational fractions look ugly). They don't save any
download time, but they do save screen space. They're sometimes handly
for galleries, where you're likely to download the full-sized image
anyway.
Any "validator" that gives an error for missing height / width
attributes (rather than merely a warning) is incorrect.
--
Smert' spamionam