|
Adding Images
Images add interest and excitement to your Web pages, and they are fairly easy
to add. The <img> tag has only one required attribute, SRC, and that is
to tell the browser which image to display.
However, there are three other attributes that it is strongly recommended
you include, width, height, and alt. The width and height attributes tell the
browser how big the image is. This allows the Web page to render more quickly,
as the browser can allocate space for the image and then move on to the rest of
the page while the image downloads. The alt attribute allows you to specify
alternative text for the image. This text will show up when people put their
mouse over the image, plus it makes your page accessible to people with text
readers and non-visual browsers.
Hint on finding the width and height: If you load the image in
Netscape, the width and height are displayed in the title, "GIF image width x
height pixels - Netscape".
Using the img Tag
<img src="URL to the image" width="width in pixels" height="height in pixels"
alt="alternative description of the image">
|