Jsp said:
If you want an image to appear in its original size,
And why would you want anything else, in HTML? (Leaving scaling to browsers
is usually the worst imagineable alternative.)
is there any reason
for defining the <width> and <height> within the <img> tag,
You mean width and height _attributes_ - referring to them with
<width> and <height> is odd.
The reason for using those attributes is that they may speed up rendering,
since the browser can reserve space for the image before getting the actual
data. Those attributes are however best omitted if the image is small as
compared with the alt text, since most current browsers (counted by
frequency of use) by default truncate the alt text into the length that
fits in into the space allocated for the image.
or in its
class or id in the CSS?
That's a different issue. Use those attributes if you have some specific
need for them, like styling a particular image.
Can it show wrong in some browser if you simply leave out the size
specification?
No.