|
Img
<IMG> </IMG> IMG is used to insert images in HTML documents. The location of the image is put in the SRC attribute, and it can be a relative or an absolute URL. When the image cann't be displayed for some reason, the browser displays the ALT text instead. The WIDTH and HEIGHT attributes contain the image's dimensions, but this is optional. It allows a browser to lay out the page in advance, because it will know how large each image is, then your page will load faster. Make sure you use the correct height and width, if you don't the image will be resized and may look bad. ALIGN controls the alignment of the image to text. Using a value of LEFT or RIGHT will make the image line up against the left or right margin, and text will flow around it. To force text below an aligned image, use BR with the CLEAR attribute. The values TOP, MIDDLE and BOTTOM specify where any text following the image should be put. If more than one line follows after the image, it will be put below the image. VSPACE and HSPACE get a number value, telling the number of pixels that should be left free around the image. VSPACE covers vertical spacing and HSPACE horizontal spacing. The BORDER attribute is used when the image is a link. It tells that the browser should have a border of the indicated size around the image to show that it is a link. Most of the time BORDER=0 is used to turn it off. This has the disadvantage that the image must make it very clear that it is a link. ISMAP and USEMAP are used for imagemaps. The ISMAP attribute specifies that the link that this image is in goes to an imagemap program on the server, so the browser can send the coordinates of the selected location to the server. USEMAP is used for a so-called client-side imagemap. It specifies the URL of the imagemap information. See the section on the MAP tag for more information about client-side imagemaps. Although the ALT attribute is not required, it is good to add it. If the image is purely for decoration, use ALT="" or a decorative ALT text like "*" if possible.
|