IMG Tag (HTML Code for Pictures)
The <img> tag gives us graphical capabilities and helps make cool html code. The web allows us to share any graphical image as long as it is a .GIF or a .JPG file. The <img> tag does not use a closing tag. A cute graphic can really enhance your web site.
- src="url" width=xxx height=xxx align=position border=xx alt="description" hspace=xx vspace=xx usemap="url">
- The URL is the location and filename of the image file. This address can be an absolute web address or a relative address within the web site.
- Width, in either pixels or the percentage of the screen (ie; 80%).
- The actual height of the image in pixels.
- The align modifier controls the horizontal location, with respect to the field the item resides in. Options can be LEFT, CENTER or RIGHT.
- Builds a frame around the picture the width of the number of pixels. BORDER=0 would put no border around the image.
- This is the alternate description for people without graphical browsers (the blind). It
is also noted by the Search Engines.
- This is much like the alternate description.
- HSPACE is the amount of horizontal spacing between the picture and any surrounding text.
- VSPACE is the amount of vertical spacing between the picture and any surrounding text.
- The NAME is defined by the <MAP></MAP> tags and should match the graphic as well. See the <AREA> tag for more information.
- The URL of the image can be located by a relative address (../pics/image.gif) or by an absolute address (http://www.nampa.net/pics/line.gif).
- WIDTH or HEIGHT
- The actual values can be determined by looking at them with a browser. Incorrect values can be used, but distort the picture. If left out, the browser can determine the values, but on a complex page it can take a noticable amount of time.