Images are a very important part of webpages. Fortunately they are very simple
to include in your page. There is an image tag with several attributes that should always be set.
The src
attribute sets the location of the image file to display. It follows the same
rules I described for the href
attribute of the anchor tag.
The alt
attribute
sets the text that should appear in place of the image if it does not load. This attribute is often
not set but it always should be. It's extremely important because it enables visually impaired
people to browse your webpage with the help of special software. It's also important for people
who browse the internet with images turned off (pages load faster on very slow dialup connections).
The width
and height
attributes set the dimensions of the image. These attributes
are often not set either. However in the case where someone views the webpage without images these
attributes keep the text on the page in the proper location. If these attributes are not set the
text could shift and look very unprofessional.
The border
attribute sets the width
of the border around the image. This attribute is most often used to set the border to "0" when
an image is used as a link. By default a border is put around an image when that image is used as a link.
<IMG SRC = "../images/eye.gif" ALT = "Eye" WIDTH = "142" HEIGHT = "141" BORDER = "4">